Skip to content

Commit f1a1e69

Browse files
committed
Fix alerts setter
1 parent 28b84b2 commit f1a1e69

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

simvue/api/objects/run.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,7 @@ def get_alert_details(self) -> typing.Generator[dict[str, typing.Any], None, Non
244244
@write_only
245245
@pydantic.validate_call
246246
def alerts(self, alerts: list[str]) -> None:
247-
self._staging["alerts"] = [
248-
alert for alert in alerts if alert not in self._staging.get("alerts", [])
249-
]
247+
self._staging["alerts"] = list(set(self._staging.get("alerts", []) + alerts))
250248

251249
@property
252250
@staging_check

0 commit comments

Comments
 (0)