From a2d04beaa1c589ffeef9a0234f04d78d3527d18d Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 1 Oct 2025 10:17:26 +0100 Subject: [PATCH] (refactor) remove redundant source validation in CreateAgent --- application/api/user/routes.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 281664d3..18df1e60 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -1660,18 +1660,6 @@ class CreateAgent(Resource): "prompt_id", "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"] else: required_fields = ["name"]