This commit is contained in:
@@ -36,7 +36,6 @@ def query_notifications(author_id: int, after: int = 0) -> tuple[int, int, list[
|
|||||||
# Convert Unix timestamp to datetime for PostgreSQL compatibility
|
# Convert Unix timestamp to datetime for PostgreSQL compatibility
|
||||||
after_datetime = datetime.fromtimestamp(after, tz=UTC)
|
after_datetime = datetime.fromtimestamp(after, tz=UTC)
|
||||||
q = q.where(Notification.created_at > after_datetime)
|
q = q.where(Notification.created_at > after_datetime)
|
||||||
q = q.group_by(NotificationSeen.notification, Notification.created_at)
|
|
||||||
|
|
||||||
with local_session() as session:
|
with local_session() as session:
|
||||||
# Build query conditions
|
# Build query conditions
|
||||||
|
|||||||
Reference in New Issue
Block a user