mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-17 04:10:24 +00:00
Deal with Django <1.7 using SortedDict wherein keys() is a generator, not a view
This commit is contained in:
parent
91b07079e0
commit
a5fe3de330
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ class InheritanceQuerySet(QuerySet):
|
|||
def iterator(self):
|
||||
iter = super(InheritanceQuerySet, self).iterator()
|
||||
if getattr(self, 'subclasses', False):
|
||||
extras = self.query.extra.keys()
|
||||
extras = tuple(self.query.extra.keys())
|
||||
# sort the subclass names longest first,
|
||||
# so with 'a' and 'a__b' it goes as deep as possible
|
||||
subclasses = sorted(self.subclasses, key=len, reverse=True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue