🐛 fix(types.py): handle case when field_type is None by assigning an empty string to improve code robustness
🐛 fix(types.py): reformat detail dictionary in raise HTTPException to improve readability
This commit is contained in:
parent
a6fe4091ac
commit
e8c844a75f
1 changed files with 3 additions and 0 deletions
|
|
@ -177,6 +177,9 @@ def build_langchain_template_custom_component(extractor: CustomComponent):
|
||||||
field_required = True
|
field_required = True
|
||||||
field_name, field_type, field_value = extra_field
|
field_name, field_type, field_value = extra_field
|
||||||
|
|
||||||
|
if not field_type:
|
||||||
|
field_type = ""
|
||||||
|
|
||||||
if field_name != "self":
|
if field_name != "self":
|
||||||
# TODO: Validate type - if is possible to render into frontend
|
# TODO: Validate type - if is possible to render into frontend
|
||||||
if "optional" in field_type.lower():
|
if "optional" in field_type.lower():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue