Opened 4 years ago
Closed 4 years ago
#32546 closed Bug (fixed)
Meta.ordering fields must not be included in GROUP BY clause
Reported by: | Yuri Konotopov | Owned by: | Yuri Konotopov |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 3.1 |
Severity: | Normal | Keywords: | |
Cc: | Simon Charette | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This continues (closed) [1] ticket.
I beleave it was not properly fixed in commit [0ddb4ebf].
While commit [0ddb4ebf] removes ORDER BY when Meta.ordering is used it still does populates GROUP BY with Meta.ordering fields thus leads to wrong aggregation.
PR with test case was added at [2].
[1] https://code.djangoproject.com/ticket/14357
[2] https://github.com/django/django/pull/14122
Change History (4)
comment:1 by , 4 years ago
Cc: | added |
---|---|
Needs tests: | set |
Owner: | changed from | to
Patch needs improvement: | set |
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 4 years ago
Needs tests: | unset |
---|
comment:3 by , 4 years ago
Patch needs improvement: | unset |
---|---|
Triage Stage: | Accepted → Ready for checkin |
comment:4 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In 330bc40: