remotes/1693045480750635534/spooky-22
Aevann1 2021-09-05 13:45:47 +02:00
parent 5103c5e68a
commit 8a7fb6767b
2 changed files with 2 additions and 3 deletions

View File

@ -150,7 +150,6 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing):
if "replies" not in self.__dict__ and "preloaded_comments" in self.__dict__:
self.tree_comments(comment=comment)
print(read)
return render_template(template,
v=v,
p=self,

View File

@ -181,8 +181,8 @@ 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)]
read = session["read_comments"]
print(read)
read = session.get("read_comments")
print(session.get("read_comments"))
read_comments = [x.id for x in post.preloaded_comments]
if session.get("read_comments"): session["read_comments"] += read_comments
else: session["read_comments"] = read_comments