groupby-fix

This commit is contained in:
2024-01-23 21:39:20 +03:00
parent 8b23ece194
commit 537b89dbaf

View File

@@ -54,7 +54,7 @@ async def get_notifications_grouped(author_id: int, after: int = 0, limit: int =
)
if after:
query = query.filter(Notification.created_at > after)
query = query.group_by(NotificationSeen.notification)
query = query.group_by(NotificationSeen.notification, Notification.created_at)
groups_amount = 0
unread = 0