mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
dont err if file doesnt delete
This commit is contained in:
parent
1696c7fb58
commit
f85f8cbdbf
1 changed files with 4 additions and 1 deletions
|
@ -137,7 +137,10 @@ def delete(id):
|
||||||
if user == post.submitter or is_mod:
|
if user == post.submitter or is_mod:
|
||||||
save_path_base = path.join(current_app.config["DATA_FOLDER"], "uploads")
|
save_path_base = path.join(current_app.config["DATA_FOLDER"], "uploads")
|
||||||
save_path = path.join(save_path_base, post.image_name)
|
save_path = path.join(save_path_base, post.image_name)
|
||||||
|
try:
|
||||||
remove(save_path)
|
remove(save_path)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
audit_event(f'Deleted post {post.id}')
|
audit_event(f'Deleted post {post.id}')
|
||||||
post.delete_instance()
|
post.delete_instance()
|
||||||
flash("Deleted that shit, brah!", "is-success")
|
flash("Deleted that shit, brah!", "is-success")
|
||||||
|
|
Loading…
Reference in a new issue