Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#10199 closed (fixed)

aggregate method on queryset shouldn't alter the state of the queryset

Reported by: Alex Gaynor Owned by: Alex Gaynor
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


basically it should clone the query so as not to affect the queryset for future usage, I'll post a testcase shortly.

Attachments (1)

aggregation-clone.diff (1.9 KB) - added by Alex Gaynor 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Alex Gaynor

Attachment: aggregation-clone.diff added

comment:1 Changed 12 years ago by Alex Gaynor

Has patch: set
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 12 years ago by Russell Keith-Magee

Resolution: fixed
Status: assignedclosed

(In [9819]) Fixed #10199 -- Modified aggregate() calls to clone the base query so that the base query can be reused. Thanks to Alex Gaynor for the report and patch.

comment:3 Changed 8 years ago by Anssi Kääriäinen

Component: ORM aggregationDatabase layer (models, ORM)
Note: See TracTickets for help on using tickets.
Back to Top