i am working on saving on the same form two tables - having a m2m relation. I don\'t succeed, my error persists with something like: Cannot set values on a ManyToManyField w
As of the Django 2.2 release you can also specify a through_defaults on the field in order to use add, create and assignment:
The
RelatedManager.add(),create(),remove(),set(),get_or_create(), andupdate_or_create()methods are now allowed on many-to-many relationships with intermediate models. The newthrough_defaultsargument is used to specify values for new intermediate model instance(s).
In your case since all the fields already have defaults it might just work in 2.2.