From ea881cce7880a11f30460a9965de74dd6183d0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20G=C3=A9r=C3=B4me?= Date: Tue, 5 Dec 2023 15:52:25 +0100 Subject: [PATCH] fix: Do not make two requests to the server to check if the pipeline exists --- openhexa/cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhexa/cli/cli.py b/openhexa/cli/cli.py index a0b2191..be6ab9b 100644 --- a/openhexa/cli/cli.py +++ b/openhexa/cli/cli.py @@ -328,7 +328,7 @@ def pipelines_delete(code: str): sys.exit(1) else: pipeline = get_pipeline(user_config, code) - if get_pipeline(user_config, code) is None: + if pipeline is None: click.echo( f"Pipeline {click.style(code, bold=True)} does not exist in workspace {click.style(workspace, bold=True)}" )