remotes/1693045480750635534/spooky-22
Aevann1 2022-01-16 09:35:41 +02:00
parent 1e1e49e5ca
commit 6662ae8053
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ class Comment(Base):
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 not x.author.shadowbanned and x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)], key=lambda x: x.realupvotes, reverse=True)
if not r and r != []: r = sorted((x for x in self.child_comments if 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
@ -217,7 +217,7 @@ class Comment(Base):
@property
def replies3(self):
r = self.__dict__.get("replies", None)
if not r and r != []: r = sorted([x for x in self.child_comments if x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)], key=lambda x: x.realupvotes, reverse=True)
if not r and r != []: r = sorted((x for x in self.child_comments if x.author_id not in (AUTOPOLLER_ID, AUTOBETTER_ID)), key=lambda x: x.realupvotes, reverse=True)
return r
@property