From ee68a685a74952f50f395f613e2be7e601412e23 Mon Sep 17 00:00:00 2001 From: Harry Date: Tue, 16 Sep 2025 11:25:16 +0800 Subject: [PATCH] fix(workflow): enforce non-nullable arguments in DraftWorkflowTriggerRunApi - Updated the argument definitions in the DraftWorkflowTriggerRunApi to include `nullable=False` for `node_id`, `trigger_name`, and `subscription_id`. This change ensures that these fields are always provided in the request, improving the robustness of the API. This fix enhances input validation and prevents potential errors related to missing arguments. --- api/controllers/console/app/workflow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/controllers/console/app/workflow.py b/api/controllers/console/app/workflow.py index f20f074c6c..3d3a7fdeed 100644 --- a/api/controllers/console/app/workflow.py +++ b/api/controllers/console/app/workflow.py @@ -886,9 +886,9 @@ class DraftWorkflowTriggerRunApi(Resource): raise Forbidden() parser = reqparse.RequestParser() - parser.add_argument("node_id", type=str, required=True, location="json") - parser.add_argument("trigger_name", type=str, required=True, location="json") - parser.add_argument("subscription_id", type=str, required=True, location="json") + parser.add_argument("node_id", type=str, required=True, location="json", nullable=False) + parser.add_argument("trigger_name", type=str, required=True, location="json", nullable=False) + parser.add_argument("subscription_id", type=str, required=True, location="json", nullable=False) args = parser.parse_args() node_id = args["node_id"] trigger_name = args["trigger_name"]