From e4833151731b7fe7cc68f6f5b38c91365a70e71a Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 11 Apr 2024 21:11:14 +0200 Subject: [PATCH] fix entry_url for hole art --- files/routes/art_submissions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/art_submissions.py b/files/routes/art_submissions.py index 4d8cea2cc..4a0929daa 100644 --- a/files/routes/art_submissions.py +++ b/files/routes/art_submissions.py @@ -116,12 +116,14 @@ def approve_art(v, id): abort(404, "Hole not found!") filename = f'/images/{time.time()}'.replace('.','') + '.webp' + entry_url = SITE_FULL_IMAGES + filename if entry.kind == "sidebar": hole.sidebarurls.append(f"{SITE_FULL_IMAGES}{filename}") else: hole.bannerurls.append(f"{SITE_FULL_IMAGES}{filename}") else: filename = f"files/assets/images/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp" + entry_url = f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp" copyfile(old, filename) trim = (entry.kind == 'sidebar') @@ -133,8 +135,6 @@ def approve_art(v, id): entry.author_id = author.id g.db.add(entry) - entry_url = f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp" - if v.id != author.id: msg = f"@{v.username} (a site admin) has approved a {entry.formatted_kind} you made:\n{entry_url}"