mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[5.2.x] 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.
Backport of a76035e925 from main.
This commit is contained in:
committed by
Sarah Boyce
parent
ae2f5381fe
commit
e306687a3a
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user