🐛 fix(validate.py): change dict() to to_dict() method to fix TypeError
The `dict()` method was causing a TypeError when trying to serialize the `template_field` object. The `to_dict()` method is the correct method to use to serialize the object.
This commit is contained in:
parent
e5676337b5
commit
753eae28c7
1 changed files with 1 additions and 1 deletions
|
|
@ -37,7 +37,7 @@ def post_validate_prompt(prompt: ValidatePromptRequest):
|
|||
name=variable, field_type="str", show=True, advanced=False
|
||||
)
|
||||
|
||||
prompt.frontend_node.template[variable] = template_field.dict()
|
||||
prompt.frontend_node.template[variable] = template_field.to_dict()
|
||||
prompt.frontend_node.custom_fields.append(variable)
|
||||
except Exception as exc:
|
||||
logger.exception(exc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue