forked from mirrors/bookwyrm
See if the image is saved in DB in the Github Actions test environment
This commit is contained in:
parent
b4e2d8c6e3
commit
022182e114
1 changed files with 23 additions and 23 deletions
|
@ -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()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue