Fix isbn search, matching the regular search #3496
Open
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.
Description
I noticed on my instance that looking for ISBN directly was always resulting in an "Oops" page. This only happens if the isbn-like search does not have local results (otherwise the local results are displayed).
I tried matching the ISBN results to the regular search results, I guess one method was changed and the other wasn't.
I haven't written any tests, though probably some should be written to avoid this method to get out-of-sync again in the future.
EDIT: looking at the tests, it seems the response expected for this method is quite different than the one that comes back from OL. I don't know if this is because the response changed or if the method being called is incorrect, so I'm not sure on how to go fixing the tests for this one, should a new response be fetched? Should the format of the search be changed to make sure the previous response is fetched?
What type of Pull Request is this?
Does this PR change settings or dependencies, or break something?
Details of breaking or configuration changes (if any of above checked)
Documentation
Tests