1
0
mirror of https://github.com/django/django.git synced 2025-06-06 12:09:11 +00:00

Avoid OrderedDict creation on lookup aggregate check

This commit is contained in:
Anssi Kääriäinen 2013-11-30 23:10:15 +02:00
parent 7c8b3a32cc
commit 32c04357a8

View File

@ -1064,6 +1064,7 @@ class Query(object):
Solve the lookup type from the lookup (eg: 'foobar__id__icontains') Solve the lookup type from the lookup (eg: 'foobar__id__icontains')
""" """
lookup_splitted = lookup.split(LOOKUP_SEP) lookup_splitted = lookup.split(LOOKUP_SEP)
if self._aggregates:
aggregate, aggregate_lookups = refs_aggregate(lookup_splitted, self.aggregates) aggregate, aggregate_lookups = refs_aggregate(lookup_splitted, self.aggregates)
if aggregate: if aggregate:
return aggregate_lookups, (), aggregate return aggregate_lookups, (), aggregate