This commit is contained in:
@@ -81,7 +81,7 @@ class Query:
|
||||
total=session.query(NotificationMessage).count(),
|
||||
)
|
||||
return nr
|
||||
except Exception as ex:
|
||||
except SQLAlchemyError as ex:
|
||||
print(f"[resolvers.schema] {ex}")
|
||||
return NotificationsResult(notifications=[], total=0, unread=0)
|
||||
|
||||
@@ -101,8 +101,7 @@ class Mutation:
|
||||
except SQLAlchemyError as e:
|
||||
session.rollback()
|
||||
print(f"[mark_notification_as_read] error: {str(e)}")
|
||||
nsr = NotificationSeenResult(error="cant mark as read")
|
||||
return nsr
|
||||
return NotificationSeenResult(error="cant mark as read")
|
||||
return NotificationSeenResult()
|
||||
|
||||
@login_required
|
||||
@@ -121,8 +120,7 @@ class Mutation:
|
||||
except SQLAlchemyError as e:
|
||||
session.rollback()
|
||||
print(f"[mark_all_notifications_as_read] error: {str(e)}")
|
||||
nsr = NotificationSeenResult(error="cant mark as read")
|
||||
return nsr
|
||||
return NotificationSeenResult(error="cant mark as read")
|
||||
return NotificationSeenResult()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user