Skip to content

Commit

Permalink
Fixed url schema x3
Browse files Browse the repository at this point in the history
  • Loading branch information
MujyKun committed Aug 16, 2021
1 parent 9f02313 commit 976df51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions IreneUtility/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ async def send_images_to_host(self):
if base_util.ex.check_file_exists(file_loc):
await base_util.ex.sql.s_groupmembers.set_group_thumbnail(self.id, image_url)
self.thumbnail = image_url
self.thumbnail.replace("https://", "")
self.thumbnail = "https://" + self.thumbnail.replace("//", "/")
thumbnail = self.thumbnail.replace("https://", "")
self.thumbnail = "https://" + thumbnail.replace("//", "/")

if self.banner:
file_loc = f"{base_util.ex.keys.idol_banner_location}{file_name}"
Expand All @@ -60,8 +60,8 @@ async def send_images_to_host(self):
if base_util.ex.check_file_exists(file_loc):
await base_util.ex.sql.s_groupmembers.set_group_banner(self.id, image_url)
self.banner = image_url
self.banner.replace("https://", "")
self.banner = "https://" + self.banner.replace("//", "/")
banner = self.banner.replace("https://", "")
self.banner = "https://" + banner.replace("//", "/")

def set_attribute(self, column, content):
"""Sets the attribute for a column in the DB.
Expand Down
4 changes: 2 additions & 2 deletions IreneUtility/models/idol.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async def send_images_to_host(self):
image_url = f"{base_util.ex.keys.image_host}avatar/{file_name}"
await base_util.ex.sql.s_groupmembers.set_member_thumbnail(self.id, image_url)
self.thumbnail = image_url
self.thumbnail.replace("https://", "")
self.thumbnail = "https://" + self.thumbnail.replace("//", "/")
thumbnail = self.thumbnail.replace("https://", "")
self.thumbnail = "https://" + thumbnail.replace("//", "/")

if self.banner:
file_loc = f"{base_util.ex.keys.idol_banner_location}{file_name}"
Expand Down

0 comments on commit 976df51

Please sign in to comment.