forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-10-19 18:25:31 +02:00
parent c6af09087f
commit f42a6018ce
1 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ class Comment(Base):
def replies(self): def replies(self):
r = self.__dict__.get("replies", None) r = self.__dict__.get("replies", None)
if r: r = [x for x in r if not x.author.shadowbanned] 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 != AUTOPOLLER_ACCOUNT], key=lambda x: x.score, 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 != AUTOPOLLER_ACCOUNT], key=lambda x: x.score, reverse=True)
return r return r
@replies.setter @replies.setter
@ -193,7 +193,7 @@ class Comment(Base):
@property @property
def replies3(self): def replies3(self):
r = self.__dict__.get("replies", None) r = self.__dict__.get("replies", None)
if not r and r != []: r = sorted([x for x in self.child_comments if x.author_id != AUTOPOLLER_ACCOUNT], key=lambda x: x.score, reverse=True) if not r and r != []: r = sorted([x for x in self.child_comments if x.author_id != AUTOPOLLER_ACCOUNT], key=lambda x: x.score, reverse=True)
return r return r
@property @property
@ -300,7 +300,7 @@ class Comment(Base):
if not body: return "" if not body: return ""
t = time.time() t = time.time()
body = censor_slurs(body, v) body = censor_slurs(body, v)
print(time.time() - t) print(time.time() - t)