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

Short PID errors after validation #1865

Open
kdp-cloud opened this issue May 3, 2024 · 1 comment
Open

Short PID errors after validation #1865

kdp-cloud opened this issue May 3, 2024 · 1 comment
Labels
Projects
Milestone

Comments

@kdp-cloud
Copy link
Collaborator

Users are able to create sample attributes with a invalid PID. E.g.: 'Source:bacterial culture'.
But when the user tries to add a sample to the Sample type, the short_pid function errors out.

  • The validation of the PID should be modified to make these PIDs invalid.
  • In case the PID passes the validation but raises an exception in the short_pid function, it should fail graciously instead just erroring out.

Screen shot:
image

@kdp-cloud kdp-cloud added the bug label May 3, 2024
@stuzart
Copy link
Member

stuzart commented May 3, 2024

I've found using URI::regexp sometimes allows invalid uri's before, but URI::ABS_URI might be better to use.

3.1.4 :003 > URI::regexp =~ 'fish:soup'
 => 0
3.1.4 :004 > URI::regexp =~ 'fish:soup pie'
 => 0
3.1.4 :005 > URI::ABS_URI =~ 'fish:soup pie'
 => nil
3.1.4 :006 > URI::ABS_URI =~ 'fish:soup'
 => 0

@stuzart stuzart added this to the 1.15.1 milestone May 8, 2024
@stuzart stuzart added this to To do in SEEK 1.15.x via automation May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants