diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2011-01-10 13:44:35 +0000 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2011-01-10 13:44:35 +0000 |
| commit | ea774bf9a7620e71567b47489bdf6cea31e64afa (patch) | |
| tree | 2a5e89292afc6f4c4d64d584ddbfb950edff320e /django | |
| parent | 937548bba45c6933dab774b59fded8f0055e8937 (diff) | |
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
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 5395af2331..477f04a964 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -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 |
