This commit is contained in:
Ross Lawley 2012-07-11 16:09:33 +01:00
commit a91b6bff8b
2 changed files with 2 additions and 1 deletions

View File

@ -706,7 +706,7 @@ class TopLevelDocumentMetaclass(DocumentMetaclass):
meta['queryset_class'] = manager.queryset_class
new_class.objects = manager
indicies = meta['indexes'] + abstract_base_indexes
indicies = [meta['indexes']] + abstract_base_indexes
user_indexes = [QuerySet._build_index_spec(new_class, spec)
for spec in indicies] + base_indexes
new_class._meta['indexes'] = user_indexes

View File

@ -492,6 +492,7 @@ class QuerySet(object):
spec = {'fields': spec}
index_list = []
direction = None
use_types = doc_cls._meta.get('allow_inheritance', True)
for key in spec['fields']:
# Get ASCENDING direction from +, DESCENDING from -, and GEO2D from *