Don't return file when some derived info is requested.#6244
Don't return file when some derived info is requested.#6244kcondon merged 3 commits intoIQSS:developfrom
Conversation
|
Can one of the admins verify this patch? |
| boolean serviceRequested = false; | ||
| boolean serviceFound = false; |
There was a problem hiding this comment.
The main change is to run through the loop of query params and to set serviceRequested = true if any of the ones required by a service are sent, and to then run the checkIfServiceSupportedAndSetConverter ~as before (now only run on service params) to decide if the specific service needed exists.
After the loop, a check to see if a service was requested but not found, and, if so, to throw a not found exception. Otherwise, we're good to go (as before)
| if (key.equals("imageThumb") || key.equals("format") || key.equals("variables")) { | ||
| serviceRequested = true; | ||
| //Only need to check if this key is associated with a service | ||
| if (downloadInstance.checkIfServiceSupportedAndSetConverter(key, value)) { |
There was a problem hiding this comment.
because this used to run for any params like :persistentId, gbrecs, key it wasn't possible to just put an exception in an else clause (as was commented out in the previous code.
landreev
left a comment
There was a problem hiding this comment.
Hi Jim,
Could you please sync the branch up with develop (mainly to increment the current version in pom.xml to 4.17, to make the QA process easier).
Looks good otherwise, thanks.
New Contributors
Welcome! New contributors should at least glance at CONTRIBUTING.md, especially the section on pull requests where we encourage you to reach out to other developers before you start coding. Also, please note that we measure code coverage and prefer you write unit tests. Pull requests can still be reviewed without tests or completion of the checklist outlined below. Note that we use the "closes" syntax below to trigger Github's automation to close the corresponding issue once the pull request is merged.
Thanks for your contribution to Dataverse!
Related Issues
Pull Request Checklist