forked from rDrama/rDrama
Merge branch 'snow' of https://github.com/Aevann1/Drama into snow
commit
d00e597a00
|
@ -242,7 +242,7 @@ class Comment(Base):
|
|||
'permalink': self.permalink,
|
||||
'is_pinned': self.is_pinned,
|
||||
'distinguish_level': self.distinguish_level,
|
||||
'post_id': self.post.id,
|
||||
'post_id': self.post.id if self.post else 0,
|
||||
'score': self.score,
|
||||
'upvotes': self.upvotes,
|
||||
'downvotes': self.downvotes,
|
||||
|
|
|
@ -229,7 +229,7 @@ class Submission(Base):
|
|||
flags = {}
|
||||
for f in self.flags: flags[f.user.username] = f.reason
|
||||
|
||||
data = {'author_name': self.author.username,
|
||||
data = {'author_name': self.author.username if self.author else '',
|
||||
'permalink': self.permalink,
|
||||
'is_banned': bool(self.is_banned),
|
||||
'deleted_utc': self.deleted_utc,
|
||||
|
|
Loading…
Reference in New Issue