Merge pull request #874 from officina/master S3 storage fix
1 files changed, 7 insertions(+), 2 deletions(-) M src/wiki/plugins/images/models.py
M src/wiki/plugins/images/models.py => src/wiki/plugins/images/models.py +7 -2
@@ 107,9 107,14 @@ class ImageRevision(RevisionPluginRevision): def on_image_revision_delete(instance, *args, **kwargs): if not instance.image: return # Remove image file path = instance.image.path.split("/")[:-1] # Remove image file instance.image.delete(save=False) try: path = instance.image.path.split("/")[:-1] except NotImplemented: # This backend storage doesn't implement 'path' so there is no path to delete return # Clean up empty directories