Opened 6 years ago
Closed 6 years ago
#30569 closed Bug (duplicate)
Count and Sum annotation interfere with each other.
Reported by: | Antoine | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
While constructing a complex QuerySet, I ran into an issue where a Sum annotation on a relation would yield a different result whether or not another, seemingly unrelated Count annotation would be added. Everything needed to reproduce the issue is detailed here, including a dump of the database I used to illustrate the issue:
Change History (2)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Summary: | Count and Sum annotation interfere with each other in a QuerySet involving multiple relations → Count and Sum annotation interfere with each other. |
Version: | 2.2 → master |
Duplicate of #10060 (see documentation).
Note:
See TracTickets
for help on using tickets.
I can push the test project on Github if it is helpful -- let me know.