From 17958066f053b17df9e3d91ab9ace9c65b746914 Mon Sep 17 00:00:00 2001
From: Marcin Sobczyk <msobczyk@syncad.com>
Date: Thu, 13 Mar 2025 13:25:35 +0100
Subject: [PATCH] Ensure update_alarms_data_asap_on_newest_node does not work
 on cached node data

---
 clive/__private/ui/app.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/clive/__private/ui/app.py b/clive/__private/ui/app.py
index a3ad343c0d..9a25ab2a5d 100644
--- a/clive/__private/ui/app.py
+++ b/clive/__private/ui/app.py
@@ -244,8 +244,10 @@ class Clive(App[int]):
 
     def update_alarms_data_asap_on_newest_node_data(self) -> Worker[None]:
         """Update alarms on the newest possible node data."""
-        self.update_data_from_node()
-        return self.update_alarms_data()
+        async def update_alarms_data_on_newest_node_data() -> None:
+            await self.update_data_from_node().wait()
+            await self.update_alarms_data().wait()
+        return self.run_worker(update_alarms_data_on_newest_node_data())
 
     @work(name="alarms data update worker", group="alarms_data", exclusive=True)
     async def update_alarms_data(self) -> None:
-- 
GitLab