fix: backport patch cf45547b53

This commit is contained in:
vrenaville
2022-01-13 14:24:06 +01:00
parent f046b4844f
commit af2d2a1cfb
+1 -2
View File
@@ -134,11 +134,10 @@ class IrAttachment(models.Model):
container_name = self._get_container_name() container_name = self._get_container_name()
blob_service_client = self._get_blob_service_client() blob_service_client = self._get_blob_service_client()
container_client = blob_service_client.get_container_client(container_name) container_client = blob_service_client.get_container_client(container_name)
if not container_client.exists():
try: try:
# Create the container # Create the container
container_client.create_container() container_client.create_container()
except ResourceExistsError:
pass
except HttpResponseError as error: except HttpResponseError as error:
_logger.exception("Error during the creation of the Azure container") _logger.exception("Error during the creation of the Azure container")
raise exceptions.UserError(str(error)) raise exceptions.UserError(str(error))