From ea836522a51bfff1e117bc7ead63aa2ef4b22ed8 Mon Sep 17 00:00:00 2001 From: Nicola Date: Wed, 13 Nov 2024 16:45:19 +0100 Subject: [PATCH] deposit: remove old user email when present * the `_cds.current_user_mail` has been removed, however it might still be present in some previous records' revisions. This makes the publishing of editing videos fail. When the `_cds.current_user_mail` is found while publishing, it is ignored. --- cds/modules/invenio_deposit/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cds/modules/invenio_deposit/api.py b/cds/modules/invenio_deposit/api.py index 408c0f8f6..82fafe42b 100644 --- a/cds/modules/invenio_deposit/api.py +++ b/cds/modules/invenio_deposit/api.py @@ -188,6 +188,8 @@ 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 + arg.get("_cds", {}).pop("current_user_mail", None) args.append({}) m = Merger(*args) try: