forked from rDrama/rDrama
1
0
Fork 0

fix %OP% snappy quote on ghost threads

master
Aevann 2023-10-27 02:21:55 +03:00
parent 8b4682268e
commit dfd8ed85c9
2 changed files with 2 additions and 2 deletions

View File

@ -319,7 +319,7 @@ class Comment(Base):
@property
@lazy
def author_name(self):
if self.ghost and not (g.v and self.id == g.v.id): return '👻'
if self.ghost and not (hasattr(g, 'v') and g.v and self.id == g.v.id): return '👻'
return self.author.user_name
@lazy

View File

@ -156,7 +156,7 @@ class Post(Base):
@property
@lazy
def author_name(self):
if self.ghost and not (g.v and self.id == g.v.id): return '👻'
if self.ghost and not (hasattr(g, 'v') and g.v and self.id == g.v.id): return '👻'
return self.author.user_name
@property