fix artifact type
This commit is contained in:
parent
d7e1270436
commit
4f1c925d9a
2 changed files with 2 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ def get_artifact_type(custom_component, build_result) -> str:
|
|||
case str():
|
||||
result = ArtifactType.TEXT
|
||||
|
||||
case dict():
|
||||
case dict() | list():
|
||||
result = ArtifactType.OBJECT
|
||||
|
||||
if result == ArtifactType.UNKNOWN:
|
||||
|
|
|
|||
|
|
@ -134,5 +134,5 @@ async def instantiate_custom_component(params, user_id, vertex, fallback_to_env_
|
|||
elif hasattr(raw, "model_dump"):
|
||||
raw = raw.model_dump()
|
||||
|
||||
artifact = {"repr": custom_repr, "raw": raw, "type": get_artifact_type(custom_component.repr_value)}
|
||||
artifact = {"repr": custom_repr, "raw": raw, "type": get_artifact_type(custom_component, build_result)}
|
||||
return custom_component, build_result, artifact
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue