Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11302 closed (fixed)

Generic Formset executes unnescesary SQL queries

Reported by: Alex Owned by: brosner
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In cases where it's passed a new, but unsaved object it still queries the DB for records, which by definition can't exist.

Attachments (1)

generic-formset-optimization.diff (707 bytes) - added by Alex 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by Alex

comment:1 Changed 6 years ago by Alex

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to brosner
  • Patch needs improvement unset

comment:2 Changed 6 years ago by brosner

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

(In [10981]) Fixed #11302 -- Avoid unnesscary (and possibly unintentional) queries/results from generic inline formsets.

When an instance with no primary key value is passed in to a generic inline
formset we ensure no queries/results occur. Thanks Alex Gaynor.

comment:3 Changed 6 years ago by brosner

(In [10982]) [1.0.X] Fixed #11302 -- Avoid unnesscary (and possibly unintentional) queries/results from generic inline formsets.

When an instance with no primary key value is passed in to a generic inline
formset we ensure no queries/results occur. Thanks Alex Gaynor.

Backport of [10981] from trunk.

Note: See TracTickets for help on using tickets.
Back to Top