#24760: Custom Aggregate: Return string (even if aggregate field is other type)
----------------------------------------------+--------------------
Reporter: psyonara | Owner: nobody
Type: Bug | Status: new
Component: Database layer (models, ORM) | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------------------+--------------------
I'm writing a custom aggregate that should return a comma-separated string
of numbers. In my specific case, the aggregate field is an IntegerField,
and so Django tries to cast the aggregate result to int. So then I
specified "is_ordinal = False" on the class, but it is still trying to
cast to int.
It seems like the code just checks if is_ordinal is True. If it's anything
other than true, it casts to the type of the aggregate field. Might this
be a bug, or is there another way to get it to not cast to int?
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/24760>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.8fe1f6d247666f9a493ae2e274909bac%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.