-
Notifications
You must be signed in to change notification settings - Fork 580
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
Fix # Issue with gene-panel-data/fetch API When molecularProfileIds is Empty [Issue 11252] #11253
base: master
Are you sure you want to change the base?
Fix # Issue with gene-panel-data/fetch API When molecularProfileIds is Empty [Issue 11252] #11253
Conversation
I did similar thing to fix the checker: However, I had to also extend endpoint to allow query to request 0 identifiers Note that github seems to be having issue with direct links to rows, so you might need to search for relevant lines in the GenePanelDataMultipleStudyFilter.java and GenePanelDataController.java |
822b89f
to
3ad70d1
Compare
Well, this PR does not account for modifications in the API (annotation to allow empty gene panel query). |
if(CollectionUtils.isEmpty(interceptedGenePanelDataMultipleStudyFilter.getMolecularProfileIds())) { | ||
List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers = interceptedGenePanelDataMultipleStudyFilter.getSampleMolecularIdentifiers() | ||
List<GenePanelData> genePanelDataList = new ArrayList<>(); | ||
if(interceptedGenePanelDataMultipleStudyFilter.getMolecularProfileIds()!= null && CollectionUtils.isEmpty(interceptedGenePanelDataMultipleStudyFilter.getMolecularProfileIds())) { |
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.
it would be nicer to call the endpoint once, store it to a variable and test against it - a function call might be unnecessarily expensive.
List<MolecularProfileCaseIdentifier> molecularProfileSampleIdentifiers = interceptedGenePanelDataMultipleStudyFilter.getSampleMolecularIdentifiers() | ||
List<GenePanelData> genePanelDataList = new ArrayList<>(); | ||
if(interceptedGenePanelDataMultipleStudyFilter.getMolecularProfileIds()!= null && CollectionUtils.isEmpty(interceptedGenePanelDataMultipleStudyFilter.getMolecularProfileIds())) { | ||
if(interceptedGenePanelDataMultipleStudyFilter.getSampleMolecularIdentifiers()!= null){ |
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.
also here
@jonkiky also I am not sure how this fix worked for you, but the API has to also enable zero-query panels, e.g.
So if you fix these, it should be ready to go. Otherwise we will create new PR and submit the fix elsehwere. |
Fix # Issue with gene-panel-data/fetch API When molecularProfileIds is Empty
Related issue ticket: #11252
There is an issue when using the API gene-panel-data/fetch with an empty molecularProfileIds array as the request payload, it returns error.
Describe changes proposed in this pull request: