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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index f00eb1e5a5..9a57af2bf3 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -650,13 +650,13 @@ class Query(BaseExpression):
for combined_query in q.combined_queries
)
q.clear_ordering(force=True)
- if limit:
+ if limit is True:
q.set_limits(high=1)
q.add_annotation(Value(1), "a")
return q
def has_results(self, using):
- q = self.exists(using)
+ q = self.exists()
compiler = q.get_compiler(using=using)
return compiler.has_results()