#34706: Aggregation on annotated field fails starting on Django 4.2.2, when the
aggregation has the same name as the annotation
-------------------------------+--------------------------------------
Reporter: Lorenzo Peña | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Mariusz Felisiak):
> The behavior reported here started happening in the patch release 4.2.2.
The code where it's breaking for me used to work properly in 4.2.0 and
4.2.1. I was expecting either a fix in the 4.2 series, or in the 5.0
series, or at least a resolution in the form of documentation. In my code
I have the Django version pinned to 4.2.1. I would like to make a decision
on whether to continue waiting, or changing my code to not use the same
name in the annotation and the aggregation. When I asked what the
"expected course of action from our side" was, I was referring to that.
Fix for #31679 was reverted in Django 4.2.2 because it introduces a
regression. We cannot fix bugs by introducing different bugs. #31679 will
not be fixed in Django 4.2.X.
> I would like to make a decision on whether to continue waiting, or
changing my code to not use the same name in the annotation and the
aggregation.
I'd recommend changing your code.
--
Ticket URL: <https://code.djangoproject.com/ticket/34706#comment:6>
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/0107018aac61fe08-a50e675b-a2ed-4641-b167-73e0cfec80f2-000000%40eu-central-1.amazonses.com.