remove bad error

pull/226/head
Aevann 2024-04-11 21:03:29 +02:00
parent d0f94a4ca9
commit 903488830b
1 changed files with 2 additions and 4 deletions

View File

@ -1862,9 +1862,7 @@ 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!")
if os.path.isfile(path):
os.remove(path)
to_delete = g.db.query(Post.thumburl, Post.posterurl).filter_by(url=url).all()