We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
output_field
1 parent 5c00f78 commit 9c472ceCopy full SHA for 9c472ce
src/django_mysql/models/aggregates.py
@@ -1,4 +1,5 @@
1
from django.db.models import Aggregate, CharField
2
+from django_mysql.models.fields import SetCharField, ListCharField
3
4
5
class BitAnd(Aggregate):
@@ -24,8 +25,10 @@ def __init__(
24
25
):
26
27
if "output_field" not in extra:
- # This can/will be improved to SetTextField or ListTextField
28
- extra["output_field"] = CharField()
+ if distinct:
29
+ extra['output_field'] = SetCharField(CharField())
30
+ else:
31
+ extra['output_field'] = ListCharField(CharField())
32
33
super().__init__(expression, **extra)
34
0 commit comments