Code

Opened 5 years ago

Closed 5 years ago

Last modified 14 months ago

#10199 closed (fixed)

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

Reported by: Alex Owned by: Alex
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: UI/UX:

Description

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 5 years ago.

Download all attachments as: .zip

Change History (4)

Changed 5 years ago by Alex

comment:1 Changed 5 years ago by Alex

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from assigned to closed

(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 14 months ago by akaariai

  • Component changed from ORM aggregation to Database layer (models, ORM)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.