feat(DraftWorkflowApi): Requires environment_variables in DraftWorkflowApi

Updates the parser to require the environment_variables
field in the DraftWorkflowApi, aligning with the anticipated
frontend updates. This change enforces consistency and
ensures necessary data is provided for processing.

Signed-off-by: -LAN- <laipz8200@outlook.com>
pull/19849/head
-LAN- 1 year ago
parent 4977bb21ec
commit a0890f8ae3
No known key found for this signature in database
GPG Key ID: 6BA0D108DED011FF

@ -81,8 +81,7 @@ class DraftWorkflowApi(Resource):
parser.add_argument("graph", type=dict, required=True, nullable=False, location="json")
parser.add_argument("features", type=dict, required=True, nullable=False, location="json")
parser.add_argument("hash", type=str, required=False, location="json")
# TODO: set this to required=True after frontend is updated
parser.add_argument("environment_variables", type=list, required=False, location="json")
parser.add_argument("environment_variables", type=list, required=True, location="json")
parser.add_argument("conversation_variables", type=list, required=False, location="json")
args = parser.parse_args()
elif "text/plain" in content_type:

Loading…
Cancel
Save