diff --git a/cds/modules/invenio_deposit/api.py b/cds/modules/invenio_deposit/api.py index 82fafe42b..b4a1982a1 100644 --- a/cds/modules/invenio_deposit/api.py +++ b/cds/modules/invenio_deposit/api.py @@ -188,7 +188,7 @@ def merge_with_published(self): args = [lca.dumps(), first.dumps(), self.dumps()] for arg in args: del arg["$schema"], arg["_deposit"] - # pop optional removed key `current_user_mail` when present + # skip legacy `current_user_mail` when comparing for merging arg.get("_cds", {}).pop("current_user_mail", None) args.append({}) m = Merger(*args) @@ -196,6 +196,8 @@ def merge_with_published(self): m.run() except UnresolvedConflictsException: raise MergeConflict() + # remove legacy `current_user_mail` when merging + lca.get("_cds", {}).pop("current_user_mail", None) return patch(m.unified_patches, lca) @index