forked from rDrama/rDrama
1
0
Fork 0

try to fix 500 error

master
Aevann 2024-03-10 21:47:13 +02:00
parent 018cde58c1
commit ada702dc39
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ def notifications_messages(v):
def notifications_chats(v):
criteria1 = (Chat.id == ChatMembership.chat_id, ChatMembership.user_id == v.id)
criteria2 = (Chat.id == ChatNotification.chat_id, ChatNotification.user_id == v.id)
chats = g.db.query(Chat, func.count(ChatNotification.chat_id)).join(ChatMembership, and_(*criteria1)).outerjoin(ChatNotification, and_(*criteria2)).group_by(Chat).order_by(func.count(ChatNotification.chat_id).desc(), ChatMembership.created_utc.desc()).all()
chats = g.db.query(Chat, func.count(ChatNotification.chat_id)).join(ChatMembership, and_(*criteria1)).outerjoin(ChatNotification, and_(*criteria2)).group_by(Chat, ChatMembership.created_utc).order_by(func.count(ChatNotification.chat_id).desc(), ChatMembership.created_utc.desc()).all()
return render_template("notifications.html", v=v, notifications=chats)
@app.get("/notifications/modmail")