fix to /notifications

pull/136/head
Aevann 2023-02-28 18:52:29 +02:00
parent 71ce22b026
commit 8f50c90b17
1 changed files with 3 additions and 0 deletions

View File

@ -359,6 +359,9 @@ def notifications(v:User):
parent = x.parent_comment
if parent.replies2 == None:
parent.replies2 = g.db.query(Comment).filter_by(parent_comment_id=parent.id).filter(or_(Comment.author_id == v.id, Comment.id.in_(cids+[x.id]))).order_by(Comment.id.desc()).all()
total.extend(parent.replies2)
for y in parent.replies2:
y.replies2 = []
listing2.append(parent)
else:
listing2.append(x)