summaryrefslogtreecommitdiff
path: root/django/db/models/sql/where.py
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@gmail.com>2015-01-30 14:26:13 +0700
committerLoic Bistuer <loic.bistuer@gmail.com>2015-01-30 22:02:58 +0700
commit4c3bfe9053766d378999d06ec34ee5fd4e39f511 (patch)
tree7fd907b4c1dc0ac93d01a4b2de960e7894b3af8a /django/db/models/sql/where.py
parentdbabf43920bfd99f0e720c7c20228c17128a2af8 (diff)
Fixed #24211 -- Removed ValuesQuerySet() and ValuesListQuerySet().
Thanks Anssi Kääriäinen, Marc Tamlyn, and Tim Graham for the reviews.
Diffstat (limited to 'django/db/models/sql/where.py')
-rw-r--r--django/db/models/sql/where.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/where.py b/django/db/models/sql/where.py
index fe428b2418..3b894b8aed 100644
--- a/django/db/models/sql/where.py
+++ b/django/db/models/sql/where.py
@@ -204,7 +204,7 @@ class SubqueryConstraint(object):
if query._db and connection.alias != query._db:
raise ValueError("Can't do subqueries with queries on different DBs.")
# Do not override already existing values.
- if not hasattr(query, 'field_names'):
+ if query._fields is None:
query = query.values(*self.targets)
else:
query = query._clone()