When editing a many-to-many-field in an inline form, the entries are not saved. The reason that this happens is that in inline_cruds.py, the form is called via
object = form.save(commit=False)
due to the commit=False, many-to-many fields will not be saved when object.save() is called.
To fix this, call form.save_m2m() after object.save() in inline_cruds.py
When editing a many-to-many-field in an inline form, the entries are not saved. The reason that this happens is that in
inline_cruds.py
, the form is called viadue to the
commit=False
, many-to-many fields will not be saved whenobject.save()
is called.To fix this, call
form.save_m2m()
afterobject.save()
ininline_cruds.py