Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Tiny refactoring of metadata handling with subentries #1478

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

markusweigelt
Copy link
Contributor

  • Ignore metadata replacement for subentries
  • Remove metadata with empty values

Fixes #1308

@markusweigelt markusweigelt changed the title [BUGFIX] Tiny refactoring of metadata handling with subentries. [BUGFIX] Tiny refactoring of metadata handling with subentries Feb 6, 2025
@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Feb 6, 2025
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (4629cf2) to head (8881d10).
Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #1478   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sebastian-meyer
Copy link
Member

@chrizzor Since I just asked you to prioritize #1308, could you please have a look at this pull request? Maybe this already fixes the issue.

Copy link
Member

@sebastian-meyer sebastian-meyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this with hierarchical as well as non-hierarchical metadata mappings?

Maybe I am confused, but as far as I understand, metadata values are always handled as arrays internally (because even non-hierarchical metadata fields can be multi-valued), so trying to distinguish hierarchical and non-hierarchical metadata by simply checking for data type "array" is not enough.

So, can you please confirm that this works for non-hierarchical, hierarchical, and multi-valued metadata fields?

@sebastian-meyer
Copy link
Member

Scratch that! I just saw that you check for arrays inside the array of metadata values. My bad!

@sebastian-meyer sebastian-meyer merged commit da70a47 into kitodo:main Feb 10, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Metadata values should be of type array, but are string
2 participants