Skip to content

Commit

Permalink
fix: log intentional deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominick Leppich committed Nov 25, 2024
1 parent 1bdf2eb commit 8f4553d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion migration/lib/mets_manipulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}'
Expand Down

0 comments on commit 8f4553d

Please sign in to comment.