cxvxcv
This commit is contained in:
parent
a070da8f83
commit
ccd66d721a
7 changed files with 56 additions and 38 deletions
|
@ -219,6 +219,12 @@ class Submission(Base):
|
|||
if domain.startswith("www."): domain = domain.split("www.")[1]
|
||||
return domain.replace("old.reddit.com", "reddit.com")
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def author_name(self):
|
||||
if self.award_count('ghosts'): return '👻'
|
||||
else: return self.author.username
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def is_youtube(self):
|
||||
|
@ -251,7 +257,7 @@ class Submission(Base):
|
|||
flags = {}
|
||||
for f in self.flags: flags[f.user.username] = f.reason
|
||||
|
||||
data = {'author_name': self.author.username if self.author else '',
|
||||
data = {'author_name': self.author_name if self.author else '',
|
||||
'permalink': self.permalink,
|
||||
'is_banned': bool(self.is_banned),
|
||||
'deleted_utc': self.deleted_utc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue