See if the image is saved in DB in the Github Actions test environment

This commit is contained in:
Joachim 2021-05-29 11:33:37 +02:00
parent b4e2d8c6e3
commit 022182e114

View file

@ -309,7 +309,7 @@ def save_and_cleanup(image, instance=None):
file_name = "%s-%s.jpg" % (str(instance.id), str(uuid4()))
image_buffer = BytesIO()
try:
# try:
try:
old_path = instance.preview_image.path
except ValueError:
@ -335,7 +335,7 @@ def save_and_cleanup(image, instance=None):
# Clean up old file after saving
if os.path.exists(old_path):
os.remove(old_path)
finally:
# finally:
image_buffer.close()