#34972: Aggregate with CombinedExpression resulting in NotImplemented instead of
None after update from 3.2 -> 4.2
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
ElRoberto538 |
Type: Bug | Status: new
Component: Database | Version: 4.2
layer (models, ORM) | Keywords: CombinedExpression,
Severity: Normal | NotImplemented, aggregate
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Hi we're currently updating to Django 4.2 before 3.2 extended support
ends, and have discovered a weird issue with some of our queries. Using
3.2 our simplified example query below would return None, now it returns
NotImplemented, is this expected behavior? Shouldn't CombinedExpression
have empty_result_set_value set to None to maintain existing behavior?
{{{
OurModel.objects.none().aggregate(random_aggregate=Sum('field_1')/Count('field_2'))['random_aggregate']
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34972>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018bdaed3634-229ec673-6926-45f1-8a45-3363f18fe0eb-000000%40eu-central-1.amazonses.com.