forked from rDrama/rDrama
1
0
Fork 0

remove jc insanity

master
Aevann 2023-03-07 17:56:38 +02:00
parent 7a52538de4
commit 1d992892d9
2 changed files with 3 additions and 3 deletions

View File

@ -135,11 +135,11 @@ class Comment(Base):
elif self.parent_submission: return f"p_{self.parent_submission}"
@lazy
def replies(self, sort, v, db:scoped_session):
def replies(self, sort, v):
if self.replies2 != None:
return self.replies2
replies = db.query(Comment).filter_by(parent_comment_id=self.id).order_by(Comment.stickied, Comment.stickied_child_id)
replies = g.db.query(Comment).filter_by(parent_comment_id=self.id).order_by(Comment.stickied, Comment.stickied_child_id)
if not self.parent_submission: sort='old'
return sort_objects(sort, replies, Comment).all()

View File

@ -20,7 +20,7 @@
{% set score=ups-downs %}
{% if render_replies %}
{% set replies=c.replies(sort=sort, v=v, db=g.db) %}
{% set replies=c.replies(sort=sort, v=v) %}
{% endif %}
{% if c.is_blocking and not c.ghost or (c.is_banned or c.deleted_utc) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id==c.author_id) %}