From 4aabfe7cf5d87e339a5ecdbda164bf15b9c35df2 Mon Sep 17 00:00:00 2001 From: Vikrant Gupta Date: Fri, 20 Sep 2024 18:13:55 +0530 Subject: [PATCH] fix: invalidate the cache for the alerts rules post update call (#6046) --- frontend/src/container/FormAlertRules/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/container/FormAlertRules/index.tsx b/frontend/src/container/FormAlertRules/index.tsx index f53a6b2cfe46..2947b2a0b346 100644 --- a/frontend/src/container/FormAlertRules/index.tsx +++ b/frontend/src/container/FormAlertRules/index.tsx @@ -370,7 +370,10 @@ function FormAlertRules({ }); // invalidate rule in cache - ruleCache.invalidateQueries([REACT_QUERY_KEY.ALERT_RULE_DETAILS, ruleId]); + ruleCache.invalidateQueries([ + REACT_QUERY_KEY.ALERT_RULE_DETAILS, + `${ruleId}`, + ]); // eslint-disable-next-line sonarjs/no-identical-functions setTimeout(() => {