1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #36051 -- Declared arity on aggregate functions.

Follow-up to 4a66a69239.
This commit is contained in:
Jacob Walls
2025-01-01 15:27:52 -05:00
committed by Sarah Boyce
parent f07360e808
commit d206d4c200
4 changed files with 36 additions and 0 deletions

View File

@@ -516,6 +516,7 @@ generated. Here's a brief example::
function = "SUM"
template = "%(function)s(%(all_values)s%(expressions)s)"
allow_distinct = False
arity = 1
def __init__(self, expression, all_values=False, **extra):
super().__init__(expression, all_values="ALL " if all_values else "", **extra)