This commit is contained in:
Aevann1 2021-12-12 21:58:21 +02:00
parent 3abaca19dd
commit 5be5385fb4
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=3"
else: return f"https://{site}/assets/images/{site_name}/preview.webp?v=500
@property
@lazy
def profile_url(self):
if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=1"
if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=1"
if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=500
if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=500
if self.profileurl: return self.profileurl
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=1"
if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=500
return f"https://{site}/assets/images/default-profile-pic.webp"
@property