From 06e1f8231e066f41729c5ec9baf01fa844e405d7 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Fri, 29 Nov 2024 16:38:38 +0000 Subject: [PATCH] migration: commit parent if Datacite DOIs are disabled --- invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py b/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py index 381a5b0f5..a29e5a01d 100644 --- a/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py +++ b/invenio_app_rdm/upgrade_scripts/migrate_11_0_to_12_0.py @@ -107,6 +107,10 @@ def update_parent(record): scheme="doi", parent=True, ) + else: + # commit parent if Datacite DOIs are disabled to create + # parent user link + record.parent.commit() def update_record(record): # skipping deleted records because can't be committed