Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#7230 closed (fixed)

No save_m2m method on BaseModelFormSet or BaseInlineFormSet

Reported by: brooks.travis@… Owned by: Brian Rosner
Component: Forms Version: newforms-admin
Severity: Keywords: nfa-blocker
Cc: cmawebsite@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


There is currently no similar method to ModelForm's save_m2m for saving m2m relationship data after a save(commit=False) on a BaseModelFormSet or BaseInlineFormSet.

Attachments (1)

7230_formset_save_m2m.diff (1.5 KB) - added by Brian Rosner 10 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 10 years ago by Brian Rosner

Owner: changed from nobody to Brian Rosner
Status: newassigned
Triage Stage: UnreviewedAccepted

This makes sense. [7507] made save() on a model formset only return changed instances. That logic should be abstracted out. Providing a save_m2m() on the BaseModelFormSet would make alot of sense.

Changed 10 years ago by Brian Rosner

Attachment: 7230_formset_save_m2m.diff added

comment:2 Changed 10 years ago by Brian Rosner

Has patch: set
milestone: 1.0 alpha
Needs documentation: set
Needs tests: set

Attached a patch, but need to add some tests and documentation.

comment:3 Changed 10 years ago by Marc Garcia

Keywords: nfa-blocker added

I add nfa-blocker keyword as synonym of 1.0 alpha milestone (just for organization).

comment:4 Changed 10 years ago by Collin Anderson

Cc: cmawebsite@… added

comment:5 Changed 10 years ago by Brian Rosner

Resolution: fixed
Status: assignedclosed

(In [7930]) newforms-admin: Fixed #7230 -- Added a save_m2m method to BaseModelFormSet when commit=False is passed to save. Thanks Books Travis for the original report.

comment:6 Changed 7 years ago by Jacob

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

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