forked from rDrama/rDrama
don't send unecessary data
parent
041481f2b6
commit
bda1e1f7b6
|
@ -305,7 +305,6 @@ class Comment(Base):
|
||||||
'downvotes': self.downvotes,
|
'downvotes': self.downvotes,
|
||||||
'is_bot': self.is_bot,
|
'is_bot': self.is_bot,
|
||||||
'reports': reports,
|
'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
|
# 'replies': [x.json for x in self.replies(sort="old", v=None)] # WORKER TIMEOUTS ON BUGTHREAD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ class Post(Base):
|
||||||
for r in self.reports:
|
for r in self.reports:
|
||||||
reports[r.user.username] = r.reason
|
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,
|
'permalink': self.permalink,
|
||||||
'shortlink': self.shortlink,
|
'shortlink': self.shortlink,
|
||||||
'is_banned': bool(self.is_banned),
|
'is_banned': bool(self.is_banned),
|
||||||
|
@ -234,7 +234,6 @@ class Post(Base):
|
||||||
'distinguish_level': self.distinguish_level,
|
'distinguish_level': self.distinguish_level,
|
||||||
'voted': self.voted if hasattr(self, 'voted') else 0,
|
'voted': self.voted if hasattr(self, 'voted') else 0,
|
||||||
'reports': reports,
|
'reports': reports,
|
||||||
'author': '👻' if self.ghost else self.author.json
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if "replies" in self.__dict__:
|
if "replies" in self.__dict__:
|
||||||
|
|
Loading…
Reference in New Issue