diff --git a/model_clone/mixin.py b/model_clone/mixin.py index d8b39625..181fecc1 100644 --- a/model_clone/mixin.py +++ b/model_clone/mixin.py @@ -532,6 +532,8 @@ def __duplicate_m2o_fields(self, duplicate, using=None): item_clone = item.make_clone(using=using) except IntegrityError: item_clone = item.make_clone(sub_clone=True) + elif item is None: + item_clone = None else: item.pk = None # pragma: no cover item_clone = item.save(using=using) # pragma: no cover