fd
This commit is contained in:
parent
52989941d2
commit
d8463ed702
2 changed files with 1 additions and 6 deletions
Binary file not shown.
Before Width: | Height: | Size: 347 B |
|
@ -448,11 +448,6 @@ class User(Base, Stndrd, Age_times):
|
||||||
return g.db.query(Follow).filter_by(target_id=self.id, user_id=user.id).first()
|
return g.db.query(Follow).filter_by(target_id=self.id, user_id=user.id).first()
|
||||||
|
|
||||||
|
|
||||||
@property
|
|
||||||
def banner_url(self):
|
|
||||||
if self.bannerurl: return self.bannerurl
|
|
||||||
else: return f"https://{site}/assets/images/default_bg.gif"
|
|
||||||
|
|
||||||
@cache.memoize(timeout=86400)
|
@cache.memoize(timeout=86400)
|
||||||
def defaultpicture(self):
|
def defaultpicture(self):
|
||||||
pic = random.randint(1, 150)
|
pic = random.randint(1, 150)
|
||||||
|
@ -473,7 +468,7 @@ class User(Base, Stndrd, Age_times):
|
||||||
'id': self.id,
|
'id': self.id,
|
||||||
'is_private': self.is_private,
|
'is_private': self.is_private,
|
||||||
'profile_url': self.profile_url,
|
'profile_url': self.profile_url,
|
||||||
'banner_url': self.banner_url,
|
'bannerurl': self.bannerurl,
|
||||||
'bio': self.bio,
|
'bio': self.bio,
|
||||||
'bio_html': self.bio_html,
|
'bio_html': self.bio_html,
|
||||||
'flair': self.customtitle
|
'flair': self.customtitle
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue