Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many-to-Many fields are not saved in inline forms #136

Open
benmaier opened this issue Nov 12, 2019 · 0 comments
Open

Many-to-Many fields are not saved in inline forms #136

benmaier opened this issue Nov 12, 2019 · 0 comments

Comments

@benmaier
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant