fix syntax #1338
This commit is contained in:
parent
e8e47c39d7
commit
8739ab9c66
@ -196,6 +196,7 @@ class Document(BaseDocument):
|
|||||||
# Ensure indexes on the collection unless auto_create_index was
|
# Ensure indexes on the collection unless auto_create_index was
|
||||||
# set to False.
|
# set to False.
|
||||||
# Also there is no need to ensure indexes on slave.
|
# Also there is no need to ensure indexes on slave.
|
||||||
|
db = cls._get_db()
|
||||||
if cls._meta.get('auto_create_index', True) and\
|
if cls._meta.get('auto_create_index', True) and\
|
||||||
db.client.is_primary:
|
db.client.is_primary:
|
||||||
cls.ensure_indexes()
|
cls.ensure_indexes()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user