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

Handle HGV/DCLP numbers entered in PN ID "advanced create" field #279

Open
ryanfb opened this issue Mar 19, 2021 · 0 comments
Open

Handle HGV/DCLP numbers entered in PN ID "advanced create" field #279

ryanfb opened this issue Mar 19, 2021 · 0 comments

Comments

@ryanfb
Copy link
Member

ryanfb commented Mar 19, 2021

If a user enters e.g. "62766" in the PN ID field, this causes an error e.g.:

NoMethodError: undefined method `values' for nil:NilClass
/PROJECT_ROOT/app/models/publication.rb:129→ populate_identifiers_from_identifiers
/PROJECT_ROOT/app/controllers/publications_controller.rb:61→ create

We should check by prepending digit-only strings with papyri.info/hgv/ and papyri.info/dclp/ to see if we get results that way, and use those results if so. If not, we should return an error message to the user informing them to use a papyri.info string.

@ryanfb ryanfb changed the title Handle HGV numbers entered in PN ID "advanced create" field Handle HGV/DCLP numbers entered in PN ID "advanced create" field Mar 19, 2021
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