summaryrefslogtreecommitdiff
path: root/django/db/models/query_utils.py
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2017-12-08 10:59:49 -0500
committerTim Graham <timograham@gmail.com>2017-12-08 10:59:49 -0500
commitb43acf22dfa59815a1f4db0558acd98816325f66 (patch)
tree3176aa73aacc65fb5af2bd2dde4a45780f9e09b7 /django/db/models/query_utils.py
parentfff86cfa46d6c5da645f162488216b08eb60db8d (diff)
Refs #27849 -- Removed empty Q() hack in filtered Aggregate.as_sql().
This required allowing WhereNode to be provided as When(condition). This was made possible by cf12257db23fa248c89a3da3f718aa01a50ca659.
Diffstat (limited to 'django/db/models/query_utils.py')
-rw-r--r--django/db/models/query_utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index 8a889264e5..62b67e6131 100644
--- a/django/db/models/query_utils.py
+++ b/django/db/models/query_utils.py
@@ -53,6 +53,7 @@ class Q(tree.Node):
AND = 'AND'
OR = 'OR'
default = AND
+ conditional = True
def __init__(self, *args, **kwargs):
connector = kwargs.pop('_connector', None)