1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #36042 -- Consolidated composite expression checks in BaseExpression.

Remove redundant Func.resolve_expression and adjust CombinedExpression to
delegate source expression resolving to super() to perform checks against
allows_composite_expressions in a single location.
This commit is contained in:
Simon Charette
2025-01-20 22:26:01 -05:00
committed by Sarah Boyce
parent 136a1e8927
commit a76035e925
3 changed files with 30 additions and 58 deletions

View File

@@ -138,6 +138,6 @@ class CompositePKAggregateTests(TestCase):
)
def test_max_pk(self):
msg = "Max does not support composite primary keys."
msg = "Max expression does not support composite primary keys."
with self.assertRaisesMessage(ValueError, msg):
Comment.objects.aggregate(Max("pk"))