samvera / valkyrie

A Data Mapper library to enable multiple backends for storage of files and metadata in Samvera
Other
34 stars 23 forks source link

Check for nil id to avoid InvalidURIError #972

Closed dlpierce closed 1 week ago

dlpierce commented 1 week ago

With fedora, If an empty string is passed to find_by it gets changed into a nil by id_to_uri. That nil will later cause InvalidURIError to be raised where other adapters will raise ObjectNotFound. This aligns the behavior of the fedora adapter with the others, and adds some checks in the shared spec.