Skip to content

Commit

Permalink
Fix false positives in domain monitoring module
Browse files Browse the repository at this point in the history
Corrected the issue causing false positives in the domain monitoring module.
  • Loading branch information
NEZRI Ygal authored and NEZRI Ygal committed Jun 27, 2024
1 parent 85a5bc7 commit dc207a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Watcher/Watcher/site_monitoring/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc207a1

Please sign in to comment.