Skip to content

update needs to be more careful about updating Author records #16

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

Open
balmas opened this issue Apr 14, 2016 · 0 comments
Open

update needs to be more careful about updating Author records #16

balmas opened this issue Apr 14, 2016 · 0 comments

Comments

@balmas
Copy link
Contributor

balmas commented Apr 14, 2016

In application_helper.find_basic_info, we search for an Author record using the Author.get_by_id method, passing it what we think is a canonical id.

this method first tries to find an exact match on the supplied canonical_id in the canonical_id field and if it fails, it does a regex match (rlike) on the canonical_id in the alt_ids field. This can lead to false matches, particularly if the canonical_id is wrong.

At the point at which we call this in the update code, we are working with data that hasn't been validated enough to be sure it should be used to update an existing record. For example, the case that exposed this, had "0497" in an identifier element of type fhg rather than "fhg0497", so it matched all records which contained 0497 in an alternate id, which is not so unusual for LCCN, VIAF, etc.

There is quite a bit wrong with this logic...

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

No branches or pull requests

1 participant