-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent NPE in MyData when all dataverses are harvested dataverses #11086
base: develop
Are you sure you want to change the base?
Prevent NPE in MyData when all dataverses are harvested dataverses #11086
Conversation
…h-harvested-dataverses
6bddf8c
to
40a2080
Compare
Hi @plecor, Thanks for this PR. We have recently released version 6.5 of the Dataverse Software so please update your branch so that it will be ready for QA. Thanks again. (I am in the process of reviewing your submission, but it is likely that we won't be able to merge it until early in the coming year.) |
…h-harvested-dataverses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! Looks good. passing to QA.
What this PR does / why we need it:
As discussed in #11083, MyData was checking for empty results and then filtering against harvested dataverses, producing a NullPointerException later on when all the results are harvested dataverses.
This moves the empty results check after filtering against harvested dataverses, resulting in a 'Sorry, no results were found." API response instead of the previous server error.
Which issue(s) this PR closes:
This improves #11083 but does not close it (non-harvested datasets in harvested dataverses are still filtered).
Special notes for your reviewer:
See the issue for steps to reproduce.
Suggestions on how to test this:
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
No interface change
Is there a release notes update needed for this change?:
This could be mentioned (see snippet) but has no major impact.
Additional documentation:
I updated the IT test with some extra use cases. I'm not actually testing the harvested dataverse case as I am not sure if the expected result is truly the same as the current result.
Bug mentioned at https://dataverse-guide--11086.org.readthedocs.build/en/11086/api/native-api.html#mydata