forked from rDrama/rDrama
1
0
Fork 0

fix 500 error

master
Aevann 2023-03-25 01:59:42 +02:00
parent 517c67a338
commit 00aa44f060
1 changed files with 6 additions and 6 deletions

View File

@ -125,15 +125,15 @@ def notifications_messages(v:User):
).update({Notification.read: True})
g.db.flush()
list_to_perserve_unread_attribute = []
comments_unread = g.db.query(Comment).filter(Comment.id.in_(notifs_unread))
for c in comments_unread:
c.unread = True
list_to_perserve_unread_attribute.append(c)
next_exists = (len(message_threads) > 25)
listing = message_threads[:25]
list_to_perserve_unread_attribute = []
comments_unread = g.db.query(Comment).filter(Comment.id.in_(notifs_unread))
for c in comments_unread:
c.unread = True
list_to_perserve_unread_attribute.append(c)
if v.client: return {"data":[x.json(g.db) for x in listing]}
return render_template("notifications.html",