harvard-lil / perma

Indelible links
408 stars 72 forks source link

Bugfix: don't force URL validation if a file is provided. #3474

Closed rebeccacremona closed 5 months ago

rebeccacremona commented 5 months ago

We recently made a change to Perma's URL validation behavior: we used to validate URLs locally, but now we send the URLs to the Scoop API for validation.

When I added the new code, I missed two important lines. We are not supposed to validate the URL, if making a Perma Link from an upload instead of from a capture.

It turns out that our tests of the upload-your-own functionality use the same URL every time... a valid one.

So, this PR does two thing:

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (3523e14) 71.21% compared to head (a3202e2) 71.22%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3474 +/- ## ======================================== Coverage 71.21% 71.22% ======================================== Files 48 48 Lines 6494 6495 +1 ======================================== + Hits 4625 4626 +1 Misses 1869 1869 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sentry-io[bot] commented 4 months ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎