mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
allowing default empty string to pass the test
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user