mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06:08 +00:00
Fixed #10100 -- Corrected handling of the negation required exclude() clauses that reference aggregate columns. Thanks to Anossov for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1266,7 +1266,11 @@ class BaseQuery(object):
|
||||
|
||||
for alias, aggregate in self.aggregate_select.items():
|
||||
if alias == parts[0]:
|
||||
self.having.add((aggregate, lookup_type, value), AND)
|
||||
entry = self.where_class()
|
||||
entry.add((aggregate, lookup_type, value), AND)
|
||||
if negate:
|
||||
entry.negate()
|
||||
self.having.add(entry, AND)
|
||||
return
|
||||
|
||||
opts = self.get_meta()
|
||||
|
||||
Reference in New Issue
Block a user