mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 02:08:36 +00:00
fix: forward patch cf45547b53
This commit is contained in:
@@ -132,14 +132,13 @@ 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)
|
||||||
try:
|
if not container_client.exists():
|
||||||
# Create the container
|
try:
|
||||||
container_client.create_container()
|
# Create the container
|
||||||
except ResourceExistsError:
|
container_client.create_container()
|
||||||
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))
|
|
||||||
return container_client
|
return container_client
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|||||||
Reference in New Issue
Block a user