forked from rDrama/rDrama
dont delete the original image if process_image fails
parent
25bd39adbb
commit
b2dede21b1
|
@ -123,9 +123,10 @@ def approve_art(v, id):
|
||||||
else:
|
else:
|
||||||
filename = f"files/assets/images/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp"
|
filename = f"files/assets/images/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp"
|
||||||
|
|
||||||
move(old, filename)
|
copyfile(old, filename)
|
||||||
trim = (entry.kind == 'sidebar')
|
trim = (entry.kind == 'sidebar')
|
||||||
process_image(filename, v, resize=entry.resize, trim=trim)
|
process_image(filename, v, resize=entry.resize, trim=trim)
|
||||||
|
os.remove(old)
|
||||||
|
|
||||||
author = request.values.get('author').strip()
|
author = request.values.get('author').strip()
|
||||||
author = get_user(author)
|
author = get_user(author)
|
||||||
|
|
Loading…
Reference in New Issue