Skip to content

Commit

Permalink
Fix rebase indentation issue
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirFilonov committed Dec 16, 2024
1 parent dbc70c8 commit a76ea4b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions keep/api/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -4811,21 +4811,21 @@ def set_last_alert(
last_alert.alert_id = alert.id
session.add(last_alert)

elif not last_alert:
logger.info(
f"No last alert for `{alert.fingerprint}`, creating new"
)
last_alert = LastAlert(
tenant_id=tenant_id,
fingerprint=alert.fingerprint,
timestamp=alert.timestamp,
first_timestamp=alert.timestamp,
alert_id=alert.id,
alert_hash=alert.alert_hash,
elif not last_alert:
logger.info(
f"No last alert for `{alert.fingerprint}`, creating new"
)
last_alert = LastAlert(
tenant_id=tenant_id,
fingerprint=alert.fingerprint,
timestamp=alert.timestamp,
first_timestamp=alert.timestamp,
alert_id=alert.id,
alert_hash=alert.alert_hash,
)

session.add(last_alert)
session.commit()
session.add(last_alert)
session.commit()
except OperationalError as ex:
if "no such savepoint" in ex.args[0]:
logger.info(
Expand Down

0 comments on commit a76ea4b

Please sign in to comment.