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
This commit is contained in:
parent
8aeeec0b35
commit
1a53632306
|
@ -395,7 +395,7 @@ class ValuesQuerySet(QuerySet):
|
||||||
# self._fields is a list of field names to fetch.
|
# self._fields is a list of field names to fetch.
|
||||||
if self._fields:
|
if self._fields:
|
||||||
columns = [self.model._meta.get_field(f, many_to_many=False).column for f in 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.
|
else: # Default to all fields.
|
||||||
columns = [f.column for f in self.model._meta.fields]
|
columns = [f.column for f in self.model._meta.fields]
|
||||||
field_names = [f.attname for f in self.model._meta.fields]
|
field_names = [f.attname for f in self.model._meta.fields]
|
||||||
|
|
Loading…
Reference in New Issue