Address liteary form control field bug #208
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose and background context
MARC record
alma:9935219630906761
has come through Transmogrifier a handful of times where control field 008 is not 34 characters, and therefore throws an error when we attempt to grab the 33rd character. This stops the Transmogrifier run completely.How this addresses that need:
None
for literary formSide effects of this change:
How can a reviewer manually see the effects of these changes?
New test
test_get_literary_form_returns_none_if_control_field_too_short
tests this edge case.If interested, the file in production S3
s3://timdex-extract-prod-300442551476/alma/alma-2023-08-18-daily-extracted-records-to-index.xml
is known to contain this record and has thrown this error in the past. Running transmogrifier locally against this file should not fail anymore:In the output, you should be able to search for string "could not parse literary form" in the verbose debug output and find this record received the value
None
.Includes new or updated dependencies?
NO
Changes expectations for external applications?
YES: reduced Transmogrifier run failures
What are the relevant tickets?
Developer
Code Reviewer(s)