Opened 17 years ago

Closed 17 years ago

#5758 closed (fixed)

[newforms-admin] save() fails for non-deletable formsets

Reported by: Antti Kaihola Owned by: nobody
Component: Forms Version: newforms-admin
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

Description

If deletable=True is not specified for a formset, trying to save it results in a KeyError with value 'DELETE' on line 272 of django/newforms/models.py.

Attachments (2)

5758_fix.diff (665 bytes ) - added by Brian Rosner 17 years ago.
non-deletable-formset-save.diff (684 bytes ) - added by Antti Kaihola 17 years ago.
wouldn't testing for deletability implement the design more accurately?

Download all attachments as: .zip

Change History (4)

by Brian Rosner, 17 years ago

Attachment: 5758_fix.diff added

comment:1 by Brian Rosner, 17 years ago

Has patch: set
Triage Stage: UnreviewedAccepted

I have attached a patch that uses .get as opposed to directly pulling from the cleaned_data dict.

by Antti Kaihola, 17 years ago

wouldn't testing for deletability implement the design more accurately?

comment:2 by Russell Keith-Magee, 17 years ago

Resolution: fixed
Status: newclosed

(In [6654]) newforms-admin: Fixed #5758 -- Added a check to ensure that an inline model formset is actually deletable before checking the deletion field. Thanks, Brian Rosner and akaihola.

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