From 68ba58278ae1cdfd46fb5e5a225629db8956c5d0 Mon Sep 17 00:00:00 2001 From: zhiren Date: Tue, 26 Sep 2023 13:32:26 -0400 Subject: [PATCH 1/2] hotfix the cli duplication check only apply for greenroom --- app/services/file_manager/file_upload/upload_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/services/file_manager/file_upload/upload_client.py b/app/services/file_manager/file_upload/upload_client.py index cf3fb7a7..52ed7933 100644 --- a/app/services/file_manager/file_upload/upload_client.py +++ b/app/services/file_manager/file_upload/upload_client.py @@ -161,13 +161,19 @@ def check_upload_duplication(self, file_objects: List[FileObject]) -> Tuple[List """ headers = {'Authorization': 'Bearer ' + self.user.access_token, 'Session-ID': self.user.session_id} url = AppConfig.Connections.url_base + '/portal/v1/files/exists' + zone_int = 0 if self.zone == 'greenroom' else 1 # generate a list of locations for uploaded files to check duplication # at same time, generate a dict of mapping with object_path: FileObject locations = [x.object_path for x in file_objects] object_path_file_object_map = {x.object_path: x for x in file_objects} - payload = {'locations': locations, 'container_code': self.project_code, 'container_type': 'project', 'zone': 0} + payload = { + 'locations': locations, + 'container_code': self.project_code, + 'container_type': 'project', + 'zone': zone_int, + } response = resilient_session().post(url, json=payload, headers=headers) # pop the file object if the file has been uploaded From 3c84d6b9b314b91ddf63d134de0df12ecf5a9f68 Mon Sep 17 00:00:00 2001 From: zhiren Date: Tue, 26 Sep 2023 13:33:31 -0400 Subject: [PATCH 2/2] bumpup version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 16feba25..6234d349 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.7.1" +version = "2.7.2" description = "This service is designed to support pilot platform" authors = ["Indoc Systems"]