(refactor) remove redundant source validation in CreateAgent

This commit is contained in:
Alex
2025-10-01 10:17:26 +01:00
parent 7d8ed2d102
commit a2d04beaa1

View File

@@ -1660,18 +1660,6 @@ class CreateAgent(Resource):
"prompt_id", "prompt_id",
"agent_type", "agent_type",
] ]
# Require either source or sources (but not both)
if not data.get("source") and not data.get("sources"):
return make_response(
jsonify(
{
"success": False,
"message": "Either 'source' or 'sources' field is required for published agents",
}
),
400,
)
validate_fields = ["name", "description", "prompt_id", "agent_type"] validate_fields = ["name", "description", "prompt_id", "agent_type"]
else: else:
required_fields = ["name"] required_fields = ["name"]