Fix #260: sort replies to comments by new.
This commit is contained in:
parent
1d705588d4
commit
eea23f1e7c
1 changed files with 2 additions and 2 deletions
|
@ -206,14 +206,14 @@ class Comment(Base):
|
||||||
if x.author
|
if x.author
|
||||||
and not x.author.shadowbanned
|
and not x.author.shadowbanned
|
||||||
and (x.filter_state not in ('filtered', 'removed') or x.author_id == author_id)),
|
and (x.filter_state not in ('filtered', 'removed') or x.author_id == author_id)),
|
||||||
key=lambda x: x.realupvotes, reverse=True)
|
key=lambda x: x.created_utc, reverse=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def replies_ignoring_shadowbans(self):
|
def replies_ignoring_shadowbans(self):
|
||||||
if self.replies2 != None: return self.replies2
|
if self.replies2 != None: return self.replies2
|
||||||
if not self.parent_submission:
|
if not self.parent_submission:
|
||||||
return sorted(self.child_comments, key=lambda x: x.created_utc)
|
return sorted(self.child_comments, key=lambda x: x.created_utc)
|
||||||
return sorted(self.child_comments, key=lambda x: x.realupvotes, reverse=True)
|
return sorted(self.child_comments, key=lambda x: x.created_utc, reverse=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def replies2(self):
|
def replies2(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue