Skip to content

Commit

Permalink
reset failed channels
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenSpruk committed Oct 25, 2023
1 parent c0926ea commit 5ce5613
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ def make_send(
notification.sent_at = timezone.now().timestamp() if notification.sent_channels else None
notification.exceptions = exceptions if exceptions else None

_req = notification.required_channels.split(",") if notification.required_channels else []
_snt = notification.sent_channels.split(",") if notification.sent_channels else []
if set(_snt) == set(_req):
notification.failed_channels = ""

notification.save(
update_fields=[
"sent_at",
Expand Down

0 comments on commit 5ce5613

Please sign in to comment.