don't send unecessary data

master
Aevann 2023-07-07 21:55:00 +03:00
parent 041481f2b6
commit bda1e1f7b6
2 changed files with 1 additions and 3 deletions

View File

@ -305,7 +305,6 @@ class Comment(Base):
'downvotes': self.downvotes,
'is_bot': self.is_bot,
'reports': reports,
'author': '👻' if self.ghost else self.author.json,
# 'replies': [x.json for x in self.replies(sort="old", v=None)] # WORKER TIMEOUTS ON BUGTHREAD
}

View File

@ -208,7 +208,7 @@ class Post(Base):
for r in self.reports:
reports[r.user.username] = r.reason
data = {'author_name': self.author_name if self.author else '',
data = {'author_name': self.author_name,
'permalink': self.permalink,
'shortlink': self.shortlink,
'is_banned': bool(self.is_banned),
@ -234,7 +234,6 @@ class Post(Base):
'distinguish_level': self.distinguish_level,
'voted': self.voted if hasattr(self, 'voted') else 0,
'reports': reports,
'author': '👻' if self.ghost else self.author.json
}
if "replies" in self.__dict__: