Skip to content
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

Do not retrieve tags for virtual studies #2548

Merged
merged 2 commits into from
Jul 23, 2019

Conversation

oplantalech
Copy link
Contributor

What? Why?

Fix for cBioPortal/cbioportal#6285. There is a bug when using virtual studies and hovering the info icon in the query page: the endpoint /studies/{studyId}/tags returns an error after attempting to retrieve the tags given the virtual study ID (instead of an expected non-virtual study ID). Since virtual studies can be made of multiple studies, I think the best way to deal with the error is not to retrieve tags for virtual studies. Feel free to comment if you think there is a better solution to deal with the issue.

};

@observer
default class BuildOverlay extends React.Component<BuildOverlayTooltipProps, {}> {
@observable readonly studyMetadata = remoteData({
invoke: async () => {
if (this.props.isVirtualStudy) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should just deal with this condition down in the render method instead of muddying the promise with it.

@@ -43,12 +44,16 @@ export type StudyTagsTooltipProps = {
export type BuildOverlayTooltipProps = {
studyDescription: string;
studyId: string;
isVirtualStudy: boolean;
};

@observer
default class BuildOverlay extends React.Component<BuildOverlayTooltipProps, {}> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're at it, might as well change this to StudyInfoOverlay

@alisman alisman merged commit 92ff432 into cBioPortal:master Jul 23, 2019
@oplantalech oplantalech deleted the fix_tags_in_virtual_studies branch July 24, 2019 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants