allowing default empty string to pass the test

This commit is contained in:
abhi
2024-12-08 11:01:12 +05:30
parent cb5452f7ae
commit 95b1beecaf
2 changed files with 2 additions and 6 deletions

View File

@@ -293,7 +293,6 @@ class GraphModel(Graph):
) or (
"default" in field_schema
and field_schema["default"] is not None
and str(field_schema["default"]).strip() != ""
)
must_have_value = field_name in required_fields

View File

@@ -414,11 +414,8 @@ export default function useAgentGraph(
// Check if dependent field has value
const hasValue =
(inputData[key] != null &&
String(inputData[key]).trim() !== "") ||
("default" in schema &&
schema.default != null &&
String(schema.default).trim() !== "");
inputData[key] != null ||
("default" in schema && schema.default != null);
const mustHaveValue = node.data.inputSchema.required?.includes(key);