From 06d897994a1823f6d39b2987b908822c2d7a971b Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 9 Apr 2024 18:39:13 +0200 Subject: [PATCH] resolve the natsuki sidebar entry issue on WPD --- files/routes/art_submissions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/art_submissions.py b/files/routes/art_submissions.py index 524b3e509..98931ebf8 100644 --- a/files/routes/art_submissions.py +++ b/files/routes/art_submissions.py @@ -212,7 +212,9 @@ def remove_art(v, id): ) g.db.add(ma) - os.remove(f'/asset_submissions/art/{entry.id}.webp') + if os.path.isfile(f'/asset_submissions/art/{entry.id}.webp'): + os.remove(f'/asset_submissions/art/{entry.id}.webp') + msg = f"{entry.msg_kind} removed!" g.db.delete(entry)