Skip to content

Commit

Permalink
Fix update metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferril committed Jun 4, 2024
1 parent 2ab8315 commit 63bc4d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engine/apps/alerts/tasks/notify_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,6 @@ def notify_user_task(
notification_channel=notification_policy.notify_by,
)

if log_record: # log_record is None if user notification policy step is unspecified
log_record.save()

is_notification_triggered = (
log_record.type == UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_TRIGGERED
if log_record
Expand All @@ -273,6 +270,9 @@ def notify_user_task(
):
update_metrics_for_user.apply_async((user.id,))

if log_record: # log_record is None if user notification policy step is unspecified
log_record.save()

if not stop_escalation:
# if the step is NOTIFY and notification was not not bundled, perform regular notification
# and update time when user was notified
Expand Down

0 comments on commit 63bc4d0

Please sign in to comment.