Commit 91823cbe authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[storages] Remove S3 key when setting attribute to None

parent a4a9165d9f59
Pipeline #28263 passed with stage
in 2 minutes and 6 seconds
......@@ -74,7 +74,11 @@ class S3Storage(Storage):
return None
binary = entity.cw_edited.pop(attr)
if binary is not None:
if binary is None:
# remove S3 key
entity.cw_edited.edited_attribute(attr, None)
self.entity_deleted(entity, attr)
key = self.get_s3_key(entity, attr)
if key is None:
key = self.new_s3_key(entity, attr)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment