From 1a53632306d435beead75e23e5d370a07d4931cc Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 31 Jan 2006 02:29:31 +0000 Subject: [PATCH] magic-removal: Fixed bug in field-name calculation in ValuesQuerySet.iterator() git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2203 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/query.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/models/query.py b/django/db/models/query.py index d95422aa10..a4778dd3cd 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -395,7 +395,7 @@ class ValuesQuerySet(QuerySet): # self._fields is a list of field names to fetch. if self._fields: columns = [self.model._meta.get_field(f, many_to_many=False).column for f in self._fields] - field_names = [f.attname for f in self._fields] + field_names = self._fields else: # Default to all fields. columns = [f.column for f in self.model._meta.fields] field_names = [f.attname for f in self.model._meta.fields]