Skip to content

Commit

Permalink
use workflowId instead of phyloTreeId for tree object keys in FE(#865)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixAja authored Dec 14, 2021
1 parent 2df570b commit dfdae7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/frontend/src/views/Data/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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]
);
Expand Down

0 comments on commit dfdae7c

Please sign in to comment.