try to fix 500 error
parent
018cde58c1
commit
ada702dc39
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue