Merge pull request #333 from camptocamp/13_fix_delete_azure

fix: check if container is available to check delete
This commit is contained in:
Vincent Renaville authored and GitHub committed 2022-01-24 15:33:03 +01:00
commit 0b4963e3b3
1 file changed
+2
+2
View File
@@ -206,6 +206,8 @@ class IrAttachment(models.Model):
else: else:
container_name = None container_name = None
container_client = self._get_azure_container(container_name) container_client = self._get_azure_container(container_name)
if not container_client:
return ''
# delete the file only if it is on the current configured container # delete the file only if it is on the current configured container
# otherwise, we might delete files used on a different environment # otherwise, we might delete files used on a different environment
try: try:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.