Ignore Unpaywall response when article has "avoidUnpaywallPublisherLinks" set to true and host_type is "publisher" - bz 8727 #138
+93
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary - BZ-8727
Correct the behavior to match the original intent
Description
The epic talked about how when an article has
avoidUnpaywallPublisherLinks
set to true, we should ignore the Unpaywall API response when thehost_type
is publisher.This PR changes it so that, unlike the change in #134 , we will still make the Unpaywall API call when the Third Iron API's
avoidUnpaywallPublisherLinks
element is set to true. We just won't enhance the page if Unpaywall's API indicates the best_oa_location is host_type of publisher.Deploy Prerequisites
Deploy Precautions
Deploy Informational Notes