diff options
author | Simon Charette <charette.s@gmail.com> | 2022-11-29 12:31:14 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-11-29 13:08:05 +0100 |
commit | 0db8bf3d60f7a027391ce89555bdb4a95ad0a227 (patch) | |
tree | 5432b4786346b66e199d60e3541108220cb2c15a /tests/postgres_tests | |
parent | 85b52d22fd2841c34e95b3a80d6f2b668ce2f160 (diff) | |
download | django-0db8bf3d60f7a027391ce89555bdb4a95ad0a227.tar.gz |
Refs #10929 -- Fixed aggregates crash when passing strings as defaults.
Previously strings were interpreted as F() expressions and default
crashed with AttributeError:
'F' object has no attribute 'empty_result_set_value'
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r-- | tests/postgres_tests/test_aggregates.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_aggregates.py b/tests/postgres_tests/test_aggregates.py index 9cca121802..629493b78f 100644 --- a/tests/postgres_tests/test_aggregates.py +++ b/tests/postgres_tests/test_aggregates.py @@ -125,6 +125,7 @@ class TestGeneralAggregate(PostgreSQLTestCase): (BoolAnd("boolean_field", default=False), False), (BoolOr("boolean_field", default=False), False), (JSONBAgg("integer_field", default=Value('["<empty>"]')), ["<empty>"]), + (StringAgg("char_field", delimiter=";", default="<empty>"), "<empty>"), ( StringAgg("char_field", delimiter=";", default=Value("<empty>")), "<empty>", |