You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@benedikt-bartscher To clarify see the test in the linked PR as the default _clone_m2m_fields = []
SET_NULL (just clears m2m fields) - This is the default if no explicit _clone_m2m_fields is used.
CLONE (clone referenced objects, current behaviour) - This happens when _clone_m2m_fields is set.
LINK (create m2m relations with existing objects new.m2mfield.set(old.m2mfield.all()) - Would need to support this as the old objects are also duplicated.
Is there an existing issue for this?
Does this issue exist in the latest version?
Describe the bug?
When setting
_clone_m2m_fields = []
for a clone model m2m fields are cloned anyway.To Reproduce
Create a Model with CloneMixin and set
_clone_m2m_fields = []
What OS are you seeing the problem on?
No response
Expected behavior?
m2m fields are not cloned
Relevant log output
No response
Anything else?
It would be nice to set different behaviours for m2m fields like:
Code of Conduct
The text was updated successfully, but these errors were encountered: