From a476b224a81209ab2912b34915872be68e658b28 Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Wed, 24 Apr 2024 21:46:47 +0200 Subject: [PATCH] Make dataNodeLogic never load for dashboard with cached results --- frontend/src/queries/nodes/DataNode/dataNodeLogic.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts index c5f447920adfb..3fe2825525874 100644 --- a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts +++ b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts @@ -116,13 +116,13 @@ export const dataNodeLogic = kea([ actions.clearResponse() } if ( + !(props.cachedResults && props.key.includes('dashboard')) && // Don't load data on dashboard if cached results are available !queryEqual(props.query, oldProps.query) && (!props.cachedResults || (isInsightQueryNode(props.query) && !props.cachedResults['result'] && !props.cachedResults['results'])) ) { actions.loadData() - } - if (props.cachedResults) { + } else if (props.cachedResults) { // Use cached results if available, otherwise this logic will load the data again actions.setResponse(props.cachedResults) }