diff --git a/app/commands/file.py b/app/commands/file.py index 26984cf9..600fff0d 100644 --- a/app/commands/file.py +++ b/app/commands/file.py @@ -133,9 +133,8 @@ def file_put(**kwargs): # noqa: C901 user = UserConfig() zone = get_zone(zone) if zone else AppConfig.Env.green_zone.lower() - toc = customized_error_msg(ECustomizedError.TOU_CONTENT).replace(' ', '...') - if zone.lower() == AppConfig.Env.core_zone.lower() and click.confirm(fit_terminal_width(toc), abort=True): - pass + if zone.lower() == AppConfig.Env.core_zone.lower(): + SrvErrorHandler.customized_handle(ECustomizedError.INVALID_ZONE, True) if len(paths) == 0: SrvErrorHandler.customized_handle(ECustomizedError.INVALID_PATHS, True) @@ -344,7 +343,7 @@ def file_list(paths, zone, page, page_size, detached): @click.option( '-z', '--zone', - default=AppConfig.Env.green_zone, + default=AppConfig.Env.core_zone, required=False, help=file_help.file_help_page(file_help.FileHELP.FILE_SYNC_Z), show_default=False, @@ -377,6 +376,8 @@ def file_download(**kwargs): zone = get_zone(zone) if zone else AppConfig.Env.green_zone interactive = False if len(paths) > 1 else True + if zone.lower() == AppConfig.Env.green_zone.lower(): + SrvErrorHandler.customized_handle(ECustomizedError.INVALID_ZONE, True) if len(paths) == 0: SrvErrorHandler.customized_handle(ECustomizedError.MISSING_PROJECT_CODE, interactive) if geid: diff --git a/app/resources/custom_error.py b/app/resources/custom_error.py index 24fae83f..7753c251 100644 --- a/app/resources/custom_error.py +++ b/app/resources/custom_error.py @@ -83,7 +83,7 @@ class Error: 'Please verify your role and check that the file exists.' ), 'FOLDER_NOT_FOUND': 'Folder not found in the Project.', - 'INVALID_ZONE': 'The data zone invalid. Please verify the data location and try again.', + 'INVALID_ZONE': 'The data zone is invalid. Please verify the data location and try again.', 'FOLDER_EMPTY': 'Folder is empty.', 'RESERVED_FOLDER': 'Reserved folder name, please rename the folder and try again later', 'INVALID_ACTION': 'Invalid action: %s', diff --git a/pyproject.toml b/pyproject.toml index 2858054b..1c93d815 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "app" -version = "2.2.6" +version = "2.2.7" description = "This service is designed to support pilot platform" authors = ["Indoc Research"]