make sure to only search for indexes in base classes inheriting from TopLevelDocumentMetaclass

This commit is contained in:
Stefan Wojcik 2013-06-06 19:14:21 -07:00
parent 305540f0fd
commit a2457df45e

View File

@ -585,6 +585,7 @@ class Document(BaseDocument):
# add all of the indexes from the base classes
if go_up:
for base_cls in cls.__bases__:
if isinstance(base_cls, TopLevelDocumentMetaclass):
for index in base_cls.list_indexes(go_up=True, go_down=False):
if index not in indexes:
indexes.append(index)