From 746cdbf990e12e665f258c1ba72abecb3127022c Mon Sep 17 00:00:00 2001 From: Marius Andra Date: Wed, 15 Nov 2023 11:19:15 +0100 Subject: [PATCH] feat(insights): hogql insight load on load (#18610) --- frontend/src/queries/nodes/DataNode/dataNodeLogic.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts index 3feb758e5cf80..a83d0398a49d4 100644 --- a/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts +++ b/frontend/src/queries/nodes/DataNode/dataNodeLogic.ts @@ -131,7 +131,13 @@ export const dataNodeLogic = kea([ } if (props.cachedResults && !refresh) { - return props.cachedResults + if ( + props.cachedResults['result'] || + props.cachedResults['results'] || + !isInsightQueryNode(props.query) + ) { + return props.cachedResults + } } if (!values.currentTeamId) {