remove bad error

master
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,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: