mirror of
https://github.com/pretix/pretix.git
synced 2026-05-17 17:14:04 +00:00
Fix GroupConcat
This commit is contained in:
@@ -117,12 +117,17 @@ class GroupConcat(Aggregate):
|
|||||||
template = "%(function)s(%(distinct)s%(field)s::text, '%(separator)s' ORDER BY %(field)s::text ASC)"
|
template = "%(function)s(%(distinct)s%(field)s::text, '%(separator)s' ORDER BY %(field)s::text ASC)"
|
||||||
else:
|
else:
|
||||||
template = "%(function)s(%(distinct)s%(field)s::text, '%(separator)s')"
|
template = "%(function)s(%(distinct)s%(field)s::text, '%(separator)s')"
|
||||||
return super().as_sql(
|
|
||||||
|
template, params = super().as_sql(
|
||||||
compiler, connection,
|
compiler, connection,
|
||||||
function='string_agg',
|
function='string_agg',
|
||||||
template=template,
|
template=template,
|
||||||
**extra_context,
|
**extra_context,
|
||||||
)
|
)
|
||||||
|
if self.ordered:
|
||||||
|
# ordered statement requires field parameters twice
|
||||||
|
params = params + params
|
||||||
|
return template, params
|
||||||
|
|
||||||
|
|
||||||
class ReplicaRouter:
|
class ReplicaRouter:
|
||||||
|
|||||||
Reference in New Issue
Block a user