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

DeprecationRecord#find_commitment should change order of checks #313

Open
aelkiss opened this issue Oct 8, 2024 · 0 comments
Open

DeprecationRecord#find_commitment should change order of checks #313

aelkiss opened this issue Oct 8, 2024 · 0 comments

Comments

@aelkiss
Copy link
Member

aelkiss commented Oct 8, 2024

This error message is misleading:

https://github.com/hathitrust/holdings-backend/blob/main/lib/shared_print/deprecation_record.rb#L79-L83

First it checks if there are any undeprecated commitments; then it checks if any of those have a matching local ID. In this case there were 1) deprecated commitments and 2) commitments that were not deprecated & did not match the local ID.

We should reverse the order of the last two checks; that is, first check if there is a commitment with the matching local ID, then check if it’s already deprecated.

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