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 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"]