summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/db/models/query.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index 1197661150..ecfb93039b 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -102,8 +102,9 @@ class ValuesIterable(BaseIterable):
# extra(select=...) cols are always at the start of the row.
names = extra_names + field_names + annotation_names
+ indexes = range(len(names))
for row in compiler.results_iter():
- yield dict(zip(names, row))
+ yield {names[i]: row[i] for i in indexes}
class ValuesListIterable(BaseIterable):