diff --git a/src/backend/langflow/api/v1/validate.py b/src/backend/langflow/api/v1/validate.py index b7b43c376..c2d294f64 100644 --- a/src/backend/langflow/api/v1/validate.py +++ b/src/backend/langflow/api/v1/validate.py @@ -1,3 +1,5 @@ +from collections import defaultdict + from fastapi import APIRouter, HTTPException from loguru import logger @@ -42,6 +44,8 @@ def post_validate_prompt(prompt_request: ValidatePromptRequest): input_variables=input_variables, frontend_node=None, ) + if not prompt_request.custom_fields: + prompt_request.custom_fields = defaultdict(list) old_custom_fields = get_old_custom_fields( prompt_request.custom_fields, prompt_request.name )