fix: backport patch cf45547b53

This commit is contained in:
vrenaville committed 2022-01-13 14:23:19 +01:00
1 parent c9e63ee590
commit df53841bb9
1 file changed
+7 -8
+7 -8
View File
@@ -134,14 +134,13 @@ class IrAttachment(models.Model):
container_name = self._get_container_name()
blob_service_client = self._get_blob_service_client()
container_client = blob_service_client.get_container_client(container_name)
try:
# Create the container
container_client.create_container()
except ResourceExistsError:
pass
except HttpResponseError as error:
_logger.exception("Error during the creation of the Azure container")
raise exceptions.UserError(str(error))
if not container_client.exists():
try:
# Create the container
container_client.create_container()
except HttpResponseError as error:
_logger.exception("Error during the creation of the Azure container")
raise exceptions.UserError(str(error))
return container_client
@api.model
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.