fix 500 error

pull/227/head
Aevann 2024-05-24 02:49:44 +03:00
parent e3f6f44718
commit 650e0bbc86
1 changed files with 1 additions and 1 deletions

View File

@ -848,7 +848,7 @@ class User(Base):
@property
@lazy
def chat_mentions_notifications_count(self):
return g.db.query(func.sum(ChatMembership.mentions)).filter_by(user_id=self.id).one()[0]
return g.db.query(func.sum(ChatMembership.mentions)).filter_by(user_id=self.id).one()[0] or 0
@property
@lazy