forked from rDrama/rDrama
LumberFanatic I
parent
39c10f0913
commit
8065c7fd33
|
@ -101,11 +101,7 @@ class Comment(Base):
|
|||
|
||||
def total_choice_voted(self, v):
|
||||
if v:
|
||||
try:
|
||||
return g.db.query(CommentVote).filter(CommentVote.user_id == v.id, CommentVote.comment_id.in_([x.id for x in self.choices])).all()
|
||||
except:
|
||||
print(self.id, flush=True)
|
||||
return False
|
||||
return g.db.query(CommentVote).filter(CommentVote.user_id == v.id, CommentVote.comment_id.in_([x.id for x in self.choices])).all()
|
||||
return False
|
||||
|
||||
@property
|
||||
|
|
|
@ -102,7 +102,9 @@ def notifications(v):
|
|||
x.voted = 1
|
||||
if x not in c.replies2: c.replies2.append(x)
|
||||
|
||||
while c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment in comments):
|
||||
counter = 0
|
||||
while counter < 10 and c.parent_comment and (c.parent_comment.author_id == v.id or c.parent_comment in comments):
|
||||
counter += 1
|
||||
parent = c.parent_comment
|
||||
if parent.replies2 == None: parent.replies2 = [c]
|
||||
elif c not in parent.replies2: parent.replies2.append(c)
|
||||
|
|
Loading…
Reference in New Issue