Skip to content

Commit

Permalink
fix(vdp): allow empty input for recipe parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
joremysh committed Oct 14, 2024
1 parent 2220438 commit 209a127
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions instill/clients/pipeline.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 209a127

Please sign in to comment.