mirror of
https://github.com/django/django.git
synced 2025-01-03 15:06:09 +00:00
Fixed #35585 -- Corrected Query.exists() call in Query.has_results().
This commit is contained in:
parent
fb7be022cb
commit
f9bf616597
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user