fix(validation): improve variable handling and validation (#9578)

This commit is contained in:
-LAN- 2024-10-21 23:33:16 +08:00 • committed by GitHub
commit 740a723072
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View file

@ -22,7 +22,7 @@ class WorkflowToolConfigurationUtils:
if not start_node:
return []
return [VariableEntity(**variable) for variable in start_node.get("data", {}).get("variables", [])]
return [VariableEntity.model_validate(variable) for variable in start_node.get("data", {}).get("variables", [])]
@classmethod
def check_is_synced(