From 7cbbe7b3e3d9797d905effe31496c4c7a1856bb3 Mon Sep 17 00:00:00 2001 From: Pauline Ribeyre Date: Tue, 6 Aug 2019 15:43:11 -0500 Subject: [PATCH] feat(dat): hide when tiered access is enabled --- .../ExplorerVisualization/index.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/GuppyDataExplorer/ExplorerVisualization/index.jsx b/src/GuppyDataExplorer/ExplorerVisualization/index.jsx index 5f4af0692b..1822f24496 100644 --- a/src/GuppyDataExplorer/ExplorerVisualization/index.jsx +++ b/src/GuppyDataExplorer/ExplorerVisualization/index.jsx @@ -69,8 +69,17 @@ class ExplorerVisualization extends React.Component { updateConnectedFilter = async (heatMapMainYAxisVar) => { const caseField = this.props.guppyConfig.manifestMapping.referenceIdFieldInDataIndex; - const res = await this.props.downloadRawDataByFields({ fields: [caseField] }); - const caseIDList = res.map(e => e.node_id); + let caseIDList; + try { + const res = await this.props.downloadRawDataByFields({ fields: [caseField] }); + caseIDList = res.map(e => e.node_id); + } + catch { + // when tiered access is enabled, we cannot get the list of IDs because + // the user does not have access to all projects. In that case, the + // heatmap is not displayed. + caseIDList = []; + } this.connectedFilter.current.setFilter( { [heatMapMainYAxisVar]: { selectedValues: caseIDList } }, );