dfs
This commit is contained in:
parent
bda05001d8
commit
d4bf3a9b42
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue