mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #31228 -- Reallowed aggregates to be used with multiple expressions and no DISTINCT on SQLite.
Regression in bc05547cd8
.
Thanks Andy Terra for the report.
This commit is contained in:
parent
f37d548ede
commit
cbb6531e5b
2 changed files with 14 additions and 1 deletions
|
@ -63,6 +63,15 @@ class Tests(TestCase):
|
|||
with self.assertRaisesMessage(NotSupportedError, msg):
|
||||
connection.ops.check_expression_support(aggregate)
|
||||
|
||||
def test_distinct_aggregation_multiple_args_no_distinct(self):
|
||||
# Aggregate functions accept multiple arguments when DISTINCT isn't
|
||||
# used, e.g. GROUP_CONCAT().
|
||||
class DistinctAggregate(Aggregate):
|
||||
allow_distinct = True
|
||||
|
||||
aggregate = DistinctAggregate('first', 'second', distinct=False)
|
||||
connection.ops.check_expression_support(aggregate)
|
||||
|
||||
def test_memory_db_test_name(self):
|
||||
"""A named in-memory db should be allowed where supported."""
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue