-
Notifications
You must be signed in to change notification settings - Fork 1
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
SFR-2171: Fixing OCLC bib author mapping #367
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this takes care of the known edge cases. If we come across more, we have a framework for adding a test & fix. Thanks for putting this together!
def _get_creators(self, oclc_bib): | ||
if not oclc_bib.get('contributor'): | ||
return None | ||
|
||
return list( | ||
filter( | ||
lambda creator: creator.get('secondName') and creator.get('firstName'), | ||
oclc_bib['contributor'].get('creators', []) | ||
lambda creator: creator.get('secondName') or creator.get('firstName'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
|
||
oclc_bib_mapping = OCLCBibMapping(base_oclc_bib) | ||
|
||
assert ['Simpson, Homer|||true'] == oclc_bib_mapping.record.authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding these!
Description
Testing
make unit