From 8f4553d448bb05c4560048af9b5a916ca2b62c4e Mon Sep 17 00:00:00 2001 From: Dominick Leppich Date: Mon, 25 Nov 2024 11:26:37 +0100 Subject: [PATCH] fix: log intentional deletion --- migration/lib/mets_manipulator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration/lib/mets_manipulator.py b/migration/lib/mets_manipulator.py index 7195535..f06e264 100644 --- a/migration/lib/mets_manipulator.py +++ b/migration/lib/mets_manipulator.py @@ -253,7 +253,9 @@ def process_vocabulary_reference_by_value(self, node): except Exception as e: # If this fails as well and the value is not found, remove the metadata if configured if 'has no results' in e.__str__() and self.ctx.is_removable_metadata(vocabulary_id, node.text): - logging.warn(f'Removing node due to intentionally missing vocabulary value: "{node.text}"') + warn_message = f'Removing node due to intentionally missing vocabulary value: "{node.text}"' + logging.warn(warn_message) + self.ctx.log_issue(self.file_path, warn_message) self.remove_metadata_node(node) else: error = f'Unable to find record by value: {value}\n\t\t{e}'