diff --git a/pillar/application/modules/file_storage.py b/pillar/application/modules/file_storage.py index 3c3610b4..5848baaf 100644 --- a/pillar/application/modules/file_storage.py +++ b/pillar/application/modules/file_storage.py @@ -242,6 +242,10 @@ def delete_file(file_item): if file_item['backend'] == 'gcs': storage = GoogleCloudStorageBucket(str(file_item['project'])) storage.Delete(file_item['file_path']) + # Delete any file variation found in the file_item document + if 'variations' in file_item: + for v in file_item['variations']: + storage.Delete(v['file_path']) return True elif file_item['backend'] == 'pillar': pass