Skip to content

Commit

Permalink
fix: fix error in dataset KPIs when some query values are not used
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Aug 28, 2024
1 parent b0269c4 commit 2e3095d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export const datasetTwingraphQueriesResultsReducer = createReducer(initialState,
const expectedKpis = [...queriesMapping[queryId]];
result.data.forEach((result) => {
for (const [kpiId, kpiValue] of Object.entries(result)) {
if (!(kpiId in state[datasetId])) {
continue; // Value kpiId computed in query queryId does not seem to be used in any KPI or graph indicator
}
state[datasetId][kpiId].value = kpiValue;
state[datasetId][kpiId].state = KPI_STATE.READY;
const kpiIndex = expectedKpis.indexOf(kpiId);
Expand Down

0 comments on commit 2e3095d

Please sign in to comment.