From 4501bdadf2ba6627f9c718a15c7036df5783044b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Quentin=20G=C3=A9r=C3=B4me?= Date: Wed, 6 Dec 2023 15:59:18 +0100 Subject: [PATCH] fix: Do not make two requests to the server to check if the pipeline exists (#94) --- 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 cf0e2ae..e6b55b5 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)}" )