#26430: Coalesce in Aggregations ignored when EmptyResultSet returned
-------------------------------------+-------------------------------------
Reporter: ryanprater | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution:
Keywords: aggregation | Triage Stage:
coalesce in queryset | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ryanprater):
I can agree that detecting specific expressions is overkill and for that
matter, not scalable. However, I don't think an "empty list in a filter
clause seems like broken behavior". As you mentioned about valid use
cases: I'm using this with a SelectMultiple which obviously allows users
to select no options. Writing custom validation to prevent an empty query
should be the responsibility of the developer, but not enforced at the
framework level.
It seems like this could be avoided by modifying the logic of `In.rhs`
(and/or not throwing the `EmptyResultSet` at all?), but this is my first
bug and I'm not versed enough to discern.
--
Ticket URL: <https://code.djangoproject.com/ticket/26430#comment:2>
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/068.8ce1916cfaed5eed168e02c60c048e2a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.