make sure to only search for indexes in base classes inheriting from TopLevelDocumentMetaclass
This commit is contained in:
		| @@ -585,9 +585,10 @@ class Document(BaseDocument): | |||||||
|         # add all of the indexes from the base classes |         # add all of the indexes from the base classes | ||||||
|         if go_up: |         if go_up: | ||||||
|             for base_cls in cls.__bases__: |             for base_cls in cls.__bases__: | ||||||
|                 for index in base_cls.list_indexes(go_up=True, go_down=False): |                 if isinstance(base_cls, TopLevelDocumentMetaclass): | ||||||
|                     if index not in indexes: |                     for index in base_cls.list_indexes(go_up=True, go_down=False): | ||||||
|                         indexes.append(index) |                         if index not in indexes: | ||||||
|  |                             indexes.append(index) | ||||||
|  |  | ||||||
|         # add all of the indexes from subclasses |         # add all of the indexes from subclasses | ||||||
|         if go_down: |         if go_down: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user