From 209a1270036270f3ff6a467abd30b444be2386cd Mon Sep 17 00:00:00 2001 From: Jeremy Shih Date: Mon, 14 Oct 2024 15:04:32 +0800 Subject: [PATCH] fix(vdp): allow empty input for recipe parameter --- instill/clients/pipeline.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instill/clients/pipeline.py b/instill/clients/pipeline.py index 625ba53..322cf86 100644 --- a/instill/clients/pipeline.py +++ b/instill/clients/pipeline.py @@ -1,5 +1,5 @@ # pylint: disable=no-member,wrong-import-position,too-many-lines,no-name-in-module -from typing import Callable, List +from typing import Callable, List, Optional from google.protobuf import field_mask_pb2 from google.protobuf.struct_pb2 import Struct @@ -237,7 +237,7 @@ def create_pipeline( namespace_id: str, pipeline_id: str, description: str, - recipe: dict, + recipe: Optional[dict] = None, raw_recipe: str = "", async_enabled: bool = False, ) -> pipeline_interface.CreateNamespacePipelineResponse: @@ -246,6 +246,8 @@ def create_pipeline( description=description, raw_recipe=raw_recipe, ) + if recipe is None: + recipe = {} pipeline.recipe.update(recipe) if async_enabled: