Opened 8 years ago

Closed 8 years ago

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

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by Brian Rosner

Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to Brian Rosner
Patch needs improvement: unset
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 8 years ago by Brian Rosner

Attachment: 7230_formset_save_m2m.diff added

comment:2 Changed 8 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 8 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 8 years ago by Collin Anderson

Cc: cmawebsite@… added

comment:5 Changed 8 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 5 years ago by Jacob

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

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