summaryrefslogtreecommitdiff
path: root/django/db/models/sql
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql')
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 9dede765f7..13c0355753 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -1458,7 +1458,7 @@ class Query(object):
# database from tripping over IN (...,NULL,...) selects and returning
# nothing
col = query.select[0]
- select_field = col.field
+ select_field = col.target
alias = col.alias
if self.is_nullable(select_field):
lookup_class = select_field.get_lookup('isnull')