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 13, 2024
1 parent f627b89 commit 6e8318d
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 6e8318d

Please sign in to comment.