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

Ekir 384 handle null contributor names #104

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

natlibfi-kaisa
Copy link
Contributor

@natlibfi-kaisa natlibfi-kaisa commented Oct 16, 2024

Description

If an OPDS2 feed publication has an author but the name value in null, import the author's name as [Unknown] to Circulation.

Motivation and Context

When the name of a contributor was missing, it raised an error which prevented a book's import into Circulation. This PR changes the functionality so that

  • When a name property of a webpub_manifest_parser Contributor object is missing, the missing properties are saved as [Unknown] values into Circulation's contributor data.
  • Since the missing properties caused an error during the parser's extraction, that error is no longer recorded as a coverage fail which lead to the book not being imported to Circulation.
  • The functionality for edited books without an author is kept intact.

How Has This Been Tested?

Based on unit tests since our test feed doesn't contain an appropriate item.

Checklist

  • I have updated the documentation accordingly --> Backend documentation updated in Kupoli.
  • All new and existing tests passed --> Added some test cases also for existing ones to clarify edited books' author handling.
  • Transifex translators have been notified. ---> Not yet, only once we figure out how new or modified strings are uploaded to Transifex.

@natlibfi-kaisa natlibfi-kaisa force-pushed the EKIR-384-Handle-null-contributor-names branch from 7baa2e3 to b9e7f2a Compare October 17, 2024 09:26
Copy link
Contributor

@NatLibFi-JoonaKupe NatLibFi-JoonaKupe left a comment

Choose a reason for hiding this comment

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

A-ok

@natlibfi-kaisa natlibfi-kaisa merged commit 82057e8 into main Oct 22, 2024
24 checks passed
@natlibfi-kaisa natlibfi-kaisa deleted the EKIR-384-Handle-null-contributor-names branch October 22, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants