~netlandish/django-wiki

edf97311e72e8e5df3937843396d3af55be31a28 — Benjamin Bach 6 years ago 58be019
Fix image deletion issue caused by S3 storage fix
1 files changed, 1 insertions(+), 7 deletions(-)

M src/wiki/plugins/images/models.py
M src/wiki/plugins/images/models.py => src/wiki/plugins/images/models.py +1 -7
@@ 110,16 110,10 @@ def on_image_revision_delete(instance, *args, **kwargs):

    # Remove image file
    instance.image.delete(save=False)
    
    try:
        path = instance.image.path.split("/")[:-1]
    except NotImplementedError:
            # This backend storage doesn't implement 'path' so there is no path to delete
        return

    try:
        path = instance.image.path.split("/")[:-1]
    except NotImplemented:
    except NotImplementedError:
            # This backend storage doesn't implement 'path' so there is no path to delete
        return