models: HostBib: Properly handle 774s without $w#53
Merged
Conversation
anarchivist
approved these changes
Jul 14, 2026
anarchivist
left a comment
Member
There was a problem hiding this comment.
r+; looks like a reasonable change. do we need another spec/fixture to handle testing 774s without subfield $w?
the rubocop failure appears unrelated.
239aef5 to
1d52b43
Compare
davezuckerman
approved these changes
Jul 14, 2026
davezuckerman
left a comment
Contributor
There was a problem hiding this comment.
Other than the rubocop issue it looks good to go.
Member
Author
|
v2:
|
Member
Author
Yeah, I think that's a good idea. I'll add one. |
Member
Author
|
Since this should be processed like the other records, I'm not sure where to add it in |
1d52b43 to
e30346e
Compare
Member
Author
|
v3:
|
e30346e to
b874d26
Compare
Member
Author
|
v4:
|
Using `.empty?` still requires the value to not be `nil`. There is at least one record that has no `w` and therefore has a `nil` value; using `.present?` checks for nil *and* empty values. Additionally, ensure no `nil` values escape into the subfields list. Fixes: LIBIT-10644 Ref: AP-778
b874d26 to
a617ac2
Compare
Member
Author
|
v5:
|
anarchivist
approved these changes
Jul 16, 2026
anarchivist
left a comment
Member
There was a problem hiding this comment.
r+. looks great; thanks !
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Using
.empty?still requires the value to not benil. There is at least one record that has nowand therefore has anilvalue; using.present?checks for nil and empty values.Fixes: LIBIT-10644
Ref: AP-778