fix(UnpaywallImportService): prevent exception blocking the deposit process...
https://issues.unige.ch/browse/AOU-605
The logic is now in pseudo code:
if (bronze && has_repository_copy) {
if(some location with license exists) {
we take the 1st one:
- accessLevel -> public
- license -> "Other OA"
- url_for_pdf
- version
} else {
we take the 1st one without license:
- accessLevel -> restricted
- license -> null
- url_for_pdf
- version
}
} elseif ("best_oa_location" exists) {
we take from "best_oa_location":
- accessLevel -> restricted
- url_for_pdf
- license:
- if the name is known in AoU, we use it
- if there is a name, but it is unknown in AoU --> « Other OA »
- if null -> null
- version
} else {
we don't take anything
}