This commit is contained in:
Aevann1 2021-12-12 22:14:30 +02:00
parent 7a56c54cb5
commit f4816d6737
48 changed files with 136 additions and 136 deletions

View file

@ -416,15 +416,15 @@ class User(Base):
@lazy
def banner_url(self):
if self.bannerurl: return self.bannerurl
else: return f"https://{site}/assets/images/{site_name}/preview.webp?v=200
else: return f"https://{site}/assets/images/{site_name}/preview.webp?v=200"
@property
@lazy
def profile_url(self):
if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=200
if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=200
if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=200"
if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=200"
if self.profileurl: return self.profileurl
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=200
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=200"
return f"https://{site}/assets/images/default-profile-pic.webp"
@property