summaryrefslogtreecommitdiff
path: root/django/db/models/sql/query.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2012-08-08 07:33:15 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2012-08-08 07:33:15 -0700
commit4c97101b1f0815a3f311fc77483b935fe62966bb (patch)
tree82ee3da7678a31c27d17ea73a4c85e58f1fa41fc /django/db/models/sql/query.py
parent576ec12f8e7024679202b6213b8664ccd8b451b7 (diff)
remove a bunch of unnescesarry iterkeys() calls
Diffstat (limited to 'django/db/models/sql/query.py')
-rw-r--r--django/db/models/sql/query.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 69dda228bd..be257a5410 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1303,7 +1303,7 @@ class Query(object):
field, model, direct, m2m = opts.get_field_by_name(f.name)
break
else:
- names = opts.get_all_field_names() + list(six.iterkeys(self.aggregate_select))
+ names = opts.get_all_field_names() + list(self.aggregate_select)
raise FieldError("Cannot resolve keyword %r into field. "
"Choices are: %s" % (name, ", ".join(names)))
@@ -1661,8 +1661,8 @@ class Query(object):
# from the model on which the lookup failed.
raise
else:
- names = sorted(opts.get_all_field_names() + list(six.iterkeys(self.extra))
- + list(six.iterkeys(self.aggregate_select)))
+ names = sorted(opts.get_all_field_names() + list(self.extra)
+ + list(self.aggregate_select))
raise FieldError("Cannot resolve keyword %r into field. "
"Choices are: %s" % (name, ", ".join(names)))
self.remove_inherited_models()