mirror of
https://github.com/django/django.git
synced 2025-11-28 22:49:09 +00:00
Fixed #33655 -- Removed unnecessary constant from GROUP BY clause for QuerySet.exists().
This commit is contained in:
parent
dcebc5da48
commit
4282fd468f
2 changed files with 14 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ from django.db.models.expressions import (
|
|||
OuterRef,
|
||||
Ref,
|
||||
ResolvedOuterRef,
|
||||
Value,
|
||||
)
|
||||
from django.db.models.fields import Field
|
||||
from django.db.models.fields.related_lookups import MultiColSource
|
||||
|
|
@ -582,8 +583,7 @@ class Query(BaseExpression):
|
|||
q.clear_ordering(force=True)
|
||||
if limit:
|
||||
q.set_limits(high=1)
|
||||
q.add_extra({"a": 1}, None, None, None, None, None)
|
||||
q.set_extra_mask(["a"])
|
||||
q.add_annotation(Value(1), "a")
|
||||
return q
|
||||
|
||||
def has_results(self, using):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue