minor-fixes
Some checks failed
deploy / deploy (push) Failing after 1m8s

This commit is contained in:
2023-12-15 15:36:43 +03:00
parent aaf30ec115
commit 1ea9332a98
3 changed files with 6 additions and 31 deletions

View File

@@ -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()