alarms: targets need to be str
This commit is contained in:
parent
1b8a64725f
commit
5f7733d064
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class Alarm(db.Model): # type: ignore
|
|||
self.state_changed = datetime.utcnow()
|
||||
activity = Activity(activity_type="alarm_state",
|
||||
text=f"{self.alarm_state.name}->{state.name}! State changed for "
|
||||
f"{self.aspect} on {self.target}: {text}")
|
||||
f"{self.aspect} on {str(self.target)}: {text}")
|
||||
if (self.alarm_state.name in ["WARNING", "CRITICAL"]
|
||||
or state.name in ["WARNING", "CRITICAL", "UNKNOWN"]):
|
||||
# Notifications are only sent on recovery from warning/critical state or on entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue