fds
This commit is contained in:
parent
05218db27f
commit
f10dbd8fba
1 changed files with 3 additions and 7 deletions
|
@ -110,7 +110,7 @@ def notifications(v):
|
|||
Comment.deleted_utc == 0,
|
||||
Comment.author_id != AUTOJANNY_ID,
|
||||
Comment.body_html.notlike('<html><body><p>New rdrama mention: <a href="https://old.reddit.com/r/%')
|
||||
).order_by(Comment.top_comment_id.desc()).all()]
|
||||
).order_by(Comment.top_comment_id.desc()).offset(25 * (page - 1)).limit(100).all()]
|
||||
|
||||
print("2: " + str(time.time() - t), flush=True)
|
||||
|
||||
|
@ -131,17 +131,13 @@ def notifications(v):
|
|||
listing = []
|
||||
for c in comments:
|
||||
if c.parent_submission:
|
||||
if c.replies2 == None:
|
||||
c.replies2 = []
|
||||
if not c.replies2:
|
||||
c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(all))).all()
|
||||
print(c.replies2)
|
||||
cids = cids | set(x.id for x in c.replies2)
|
||||
while c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment in comments):
|
||||
c = c.parent_comment
|
||||
if c.replies2 == None:
|
||||
c.replies2 = []
|
||||
if not c.replies2:
|
||||
c.replies2 = c.child_comments.filter(or_(Comment.author_id == v.id, Comment.id.in_(all))).all()
|
||||
print(c.replies2)
|
||||
cids = cids | set(x.id for x in c.replies2)
|
||||
cids.add(c.id)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue