Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#11302 closed (fixed)

Generic Formset executes unnescesary SQL queries

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

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 Gaynor 16 years ago.

Download all attachments as: .zip

Change History (4)

by Alex Gaynor, 16 years ago

comment:1 by Alex Gaynor, 16 years ago

Owner: changed from nobody to Brian Rosner

comment:2 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

(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 by Brian Rosner, 16 years ago

(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