summaryrefslogtreecommitdiff
path: root/django/db/models/query.py
diff options
context:
space:
mode:
authorvarunkasyap <varunkasyap@hotmail.com>2026-04-02 14:56:45 +0530
committerJacob Walls <jacobtylerwalls@gmail.com>2026-04-03 09:37:32 -0400
commit3b161e60964aff99eddcd2627a486d81c1836b3a (patch)
treed6fe0a8d107a98826ba8b4b1d632acedf2d7f960 /django/db/models/query.py
parent123fa3a3f38abdb73055acc9a2cbbe3537f9323a (diff)
Fixed #37016 -- Avoided propagating invalid arguments from When() to Q().
Diffstat (limited to 'django/db/models/query.py')
-rw-r--r--django/db/models/query.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py
index dca504e441..43b55a76d0 100644
--- a/django/db/models/query.py
+++ b/django/db/models/query.py
@@ -29,7 +29,7 @@ from django.db.models.deletion import Collector
from django.db.models.expressions import Case, DatabaseDefault, F, OrderBy, Value, When
from django.db.models.fetch_modes import FETCH_ONE
from django.db.models.functions import Cast, Trunc
-from django.db.models.query_utils import FilteredRelation, Q
+from django.db.models.query_utils import PROHIBITED_FILTER_KWARGS, FilteredRelation, Q
from django.db.models.sql.constants import GET_ITERATOR_CHUNK_SIZE, ROW_COUNT
from django.db.models.utils import (
AltersData,
@@ -46,8 +46,6 @@ MAX_GET_RESULTS = 21
# The maximum number of items to display in a QuerySet.__repr__
REPR_OUTPUT_SIZE = 20
-PROHIBITED_FILTER_KWARGS = frozenset(["_connector", "_negated"])
-
class BaseIterable:
def __init__(