From 903488830b6f215d503ea3f22b7b7ccd5b815a41 Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 11 Apr 2024 21:03:29 +0200 Subject: [PATCH] remove bad error --- files/routes/admin.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 7fb6c7979..06c22ae01 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1862,10 +1862,8 @@ def delete_media_post(v): if path.startswith('/assets/images'): path = 'files' + path.split('?x=')[0] - if not os.path.isfile(path): - abort(400, "File not found on the server!") - - os.remove(path) + if os.path.isfile(path): + os.remove(path) to_delete = g.db.query(Post.thumburl, Post.posterurl).filter_by(url=url).all() for tup in to_delete: