sfd
This commit is contained in:
parent
f6d6bbce98
commit
7f52741cac
2 changed files with 12 additions and 38 deletions
|
@ -197,18 +197,12 @@ class Comment(Base):
|
|||
|
||||
@property
|
||||
def replies(self):
|
||||
r = self.__dict__.get("replies", None)
|
||||
if r: r = [x for x in r if not x.author.shadowbanned]
|
||||
if not r and r != []: r = sorted((x for x in self.child_comments if x.author and not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True)
|
||||
return r
|
||||
|
||||
@replies.setter
|
||||
def replies(self, value):
|
||||
self.__dict__["replies"] = value
|
||||
if self.replies2 != None: return [x for x in self.replies2 if not x.author.shadowbanned]
|
||||
return sorted((x for x in self.child_comments if x.author and not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True)
|
||||
|
||||
@property
|
||||
def replies2(self):
|
||||
return self.__dict__.get("replies2", [])
|
||||
return self.__dict__.get("replies2", None)
|
||||
|
||||
@replies2.setter
|
||||
def replies2(self, value):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue