I believe the behaviour you're seeing is due to the fact that the admin
view first has to save the instance of the model being edited, and only
then can it save the related objects and relationships. So it is a two-step
thing:
https://github.com/django/django/blob/84609b3205905097d7d3038d32e6101
Methods associated with m2m (clear, set) fields do not work in the save ()
method of the model using from the admin panel.
The error did not occur when instantiation or update was initiated from
other sources (wrapper, control command api)
Details (test project with instructions to reproduction