From 494286038b51b2c8827cbc33037d7b9b831c5f89 Mon Sep 17 00:00:00 2001 From: Iain Learmonth Date: Mon, 27 Jun 2022 15:31:28 +0100 Subject: [PATCH] alarms: not self --- app/models/alarms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/alarms.py b/app/models/alarms.py index 8acdde8..2ffd694 100644 --- a/app/models/alarms.py +++ b/app/models/alarms.py @@ -46,7 +46,7 @@ class Alarm(db.Model): # type: ignore if self.alarm_state != state or self.state_changed is None: self.state_changed = datetime.utcnow() activity = Activity(activity_type="alarm_state", - text=f"[{self.aspect}] {self.state.emoji} Alarm state changed from " + text=f"[{self.aspect}] {state.emoji} Alarm state changed from " f"{self.alarm_state.name} to {state.name} on {self.target}: {text}.") if (self.alarm_state.name in ["WARNING", "CRITICAL"] or state.name in ["WARNING", "CRITICAL"]):