mirror of
https://github.com/django/django.git
synced 2025-09-23 18:52:57 +00:00
Fix wrong attribute name in [15156]. Thanks to Alex Gaynor for spotting this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15169 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
937548bba4
commit
ea774bf9a7
3 changed files with 5 additions and 3 deletions
|
@ -371,8 +371,8 @@ class QuerySet(object):
|
|||
defaults = kwargs.pop('defaults', {})
|
||||
lookup = kwargs.copy()
|
||||
for f in self.model._meta.fields:
|
||||
if f.column in lookup:
|
||||
lookup[f.name] = lookup.pop(f.column)
|
||||
if f.attname in lookup:
|
||||
lookup[f.name] = lookup.pop(f.attname)
|
||||
try:
|
||||
self._for_write = True
|
||||
return self.get(**lookup), False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue