fd
This commit is contained in:
parent
e0a297fb0a
commit
edf1d471ea
1 changed files with 4 additions and 4 deletions
|
@ -181,12 +181,12 @@ def post_id(pid, anything=None, v=None):
|
||||||
|
|
||||||
post.preloaded_comments = [x for x in comments if not (x.author and x.author.shadowbanned) or (v and v.id == x.author_id)]
|
post.preloaded_comments = [x for x in comments if not (x.author and x.author.shadowbanned) or (v and v.id == x.author_id)]
|
||||||
|
|
||||||
|
|
||||||
read = session["read_comments"]
|
read = session["read_comments"]
|
||||||
read_comments = [x.id for x in post.preloaded_comments]
|
read_comments = [x.id for x in post.preloaded_comments]
|
||||||
if session.get("read_comments"): session["read_comments"] += read_comments
|
if session.get("read_comments"): session["read_comments"] += read_comments
|
||||||
else: session["read_comments"] = read_comments
|
else: session["read_comments"] = read_comments
|
||||||
|
|
||||||
|
|
||||||
post.views += 1
|
post.views += 1
|
||||||
g.db.add(post)
|
g.db.add(post)
|
||||||
if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0
|
if isinstance(session.get('over_18', 0), dict): session["over_18"] = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue