remove jc insanity
parent
7a52538de4
commit
1d992892d9
|
@ -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()
|
||||
|
||||
|
|
|
@ -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) %}
|
||||
|
|
Loading…
Reference in New Issue