From dc207a13c9fbf4136dec1785e0818e4796036620 Mon Sep 17 00:00:00 2001 From: NEZRI Ygal Date: Thu, 27 Jun 2024 11:12:33 +0200 Subject: [PATCH] Fix false positives in domain monitoring module Corrected the issue causing false positives in the domain monitoring module. --- Watcher/Watcher/site_monitoring/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Watcher/Watcher/site_monitoring/core.py b/Watcher/Watcher/site_monitoring/core.py index d9fb2b6..553021d 100644 --- a/Watcher/Watcher/site_monitoring/core.py +++ b/Watcher/Watcher/site_monitoring/core.py @@ -368,7 +368,7 @@ def create_alert(alert, site, new_ip, new_ip_second, score): # Check if the new alert is identical to the last two alerts created at the exact same time for previous_alert in last_two_alerts: - if all(getattr(previous_alert, key) == value for key, value in alert_data.items()) and previous_alert.created_at.replace(microsecond=0) == now.replace(microsecond=0): + if all(getattr(previous_alert, key) == value for key, value in alert_data.items()) and previous_alert.created_at == now: return # Create a new alert