diff --git a/keep/api/core/db.py b/keep/api/core/db.py index a3ee4c856..7823eb49e 100644 --- a/keep/api/core/db.py +++ b/keep/api/core/db.py @@ -4590,6 +4590,7 @@ def set_last_alert( ) with existed_or_new_session(session) as session: with session.begin_nested() as transaction: + last_alert = get_last_alert_by_fingerprint(tenant_id, alert.fingerprint, session, for_update=True) # To prevent rare, but possible race condition # For example if older alert failed to process