From dfdae7c1a8066829b436dc1c53baf572c6fe1909 Mon Sep 17 00:00:00 2001 From: Phoenix Logan Date: Tue, 14 Dec 2021 13:22:06 -0800 Subject: [PATCH] use workflowId instead of phyloTreeId for tree object keys in FE(#865) --- src/frontend/src/views/Data/index.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/frontend/src/views/Data/index.tsx b/src/frontend/src/views/Data/index.tsx index 39bc8ab51f..737dbc9efa 100755 --- a/src/frontend/src/views/Data/index.tsx +++ b/src/frontend/src/views/Data/index.tsx @@ -52,7 +52,6 @@ const transformData = ( const methodInputs = transform.inputs.map((key: string) => datum[key]); transformedDatum[transform.key] = transform.method(methodInputs); }); - return transformedDatum; }) as BioinformaticsDataArray; @@ -83,7 +82,12 @@ const Data: FunctionComponent = () => { const { samples, trees } = useMemo( () => ({ samples: transformData(sampleData?.samples ?? [], "publicId"), - trees: transformData(treeData?.phylo_trees ?? [], "id", TREE_TRANSFORMS), + // use workflowID as key (failed and started phylotrees do not have an associated PhyloTree ID since they are technically only PhyloRun objects) + trees: transformData( + treeData?.phylo_trees ?? [], + "workflowId", + TREE_TRANSFORMS + ), }), [sampleData, treeData] );