From 113e05a6e7e5725b8fadf6a30afa41f3dd0739c8 Mon Sep 17 00:00:00 2001 From: vrenaville Date: Thu, 3 Mar 2022 12:28:50 +0100 Subject: [PATCH] fix: fix subdirectory issue --- attachment_azure/models/ir_attachment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/attachment_azure/models/ir_attachment.py b/attachment_azure/models/ir_attachment.py index 3d8cb0b..a9e2113 100644 --- a/attachment_azure/models/ir_attachment.py +++ b/attachment_azure/models/ir_attachment.py @@ -154,7 +154,7 @@ class IrAttachment(models.Model): if fname.startswith("azure://"): key = fname.replace("azure://", "", 1).lower() if '/' in key: - container_name, key = key.split('/') + container_name, key = key.split('/', 1) else: container_name = None container_client = self._get_azure_container(container_name) @@ -201,7 +201,7 @@ class IrAttachment(models.Model): if fname.startswith("azure://"): key = fname.replace("azure://", "", 1).lower() if '/' in key: - container_name, key = key.split('/') + container_name, key = key.split('/', 1) else: container_name = None container_client = self._get_azure_container(container_name)