Skip to content

Commit

Permalink
Return group by to incidents_subquery
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirFilonov committed Nov 14, 2024
1 parent 6ea1279 commit 05c057c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions keep/api/core/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ def get_last_alerts(
).label("incidents"),
)
.filter(LastAlertToIncident.deleted_at == NULL_FOR_DELETED_AT)
.group_by(LastAlertToIncident.fingerprint)
.subquery()
)

Expand All @@ -1304,6 +1305,7 @@ def get_last_alerts(
).label("incidents"),
)
.filter(LastAlertToIncident.deleted_at == NULL_FOR_DELETED_AT)
.group_by(LastAlertToIncident.fingerprint)
.subquery()
)

Expand All @@ -1318,6 +1320,7 @@ def get_last_alerts(
).label("incidents"),
)
.filter(LastAlertToIncident.deleted_at == NULL_FOR_DELETED_AT)
.group_by(LastAlertToIncident.fingerprint)
.subquery()
)
else:
Expand Down

0 comments on commit 05c057c

Please sign in to comment.