From 5bcef53138e1a6733adcaee2bc77bd11b709e9a3 Mon Sep 17 00:00:00 2001 From: Untone Date: Tue, 23 Jan 2024 16:40:53 +0300 Subject: [PATCH] not-fix-2 --- resolvers/load.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resolvers/load.py b/resolvers/load.py index 11cb41d..b0a2b97 100644 --- a/resolvers/load.py +++ b/resolvers/load.py @@ -1,5 +1,5 @@ -from sqlalchemy.sql.operators import is_not +from sqlalchemy.sql import not_ from services.db import local_session from resolvers.model import ( NotificationReaction, @@ -67,7 +67,7 @@ async def get_notifications_grouped(author_id: int, after: int = 0, limit: int = and_( Notification.action == NotificationAction.CREATE.value, Notification.created_at > after, - ~Notification.seen + not_(Notification.seen) ) ).count() notifications_result = session.execute(query)