diff options
| author | Simon Charette <charettes@users.noreply.github.com> | 2019-01-09 17:52:36 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2019-01-09 17:52:36 -0500 |
| commit | bc05547cd8c1dd511c6b6a6c873a1bc63417b111 (patch) | |
| tree | 2ba1a136e77b21df2524d5558ea0a6f25d5ff03b /django/db/backends/sqlite3/operations.py | |
| parent | 222caab68a2a7345043d0c50161203cb2cfe70eb (diff) | |
Fixed #28658 -- Added DISTINCT handling to the Aggregate class.
Diffstat (limited to 'django/db/backends/sqlite3/operations.py')
| -rw-r--r-- | django/db/backends/sqlite3/operations.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/django/db/backends/sqlite3/operations.py b/django/db/backends/sqlite3/operations.py index 6ec4859f0e..c4b02e5c60 100644 --- a/django/db/backends/sqlite3/operations.py +++ b/django/db/backends/sqlite3/operations.py @@ -57,6 +57,11 @@ class DatabaseOperations(BaseDatabaseOperations): 'aggregations on date/time fields in sqlite3 ' 'since date/time is saved as text.' ) + if isinstance(expression, aggregates.Aggregate) and len(expression.source_expressions) > 1: + raise utils.NotSupportedError( + "SQLite doesn't support DISTINCT on aggregate functions " + "accepting multiple arguments." + ) def date_extract_sql(self, lookup_type, field_name): """ |
