From 98e8c6a3982fe6ec0fc9d374ced41aa06ebbb4ea Mon Sep 17 00:00:00 2001 From: auslin-aot <99173163+auslin-aot@users.noreply.github.com> Date: Fri, 20 Dec 2024 11:28:07 +0530 Subject: [PATCH] FWF-4120: [Bugfix] Added parentFormId to validation query --- .../src/formsflow_api/services/form_process_mapper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/forms-flow-api/src/formsflow_api/services/form_process_mapper.py b/forms-flow-api/src/formsflow_api/services/form_process_mapper.py index aeb9b444d..ac06e6d06 100644 --- a/forms-flow-api/src/formsflow_api/services/form_process_mapper.py +++ b/forms-flow-api/src/formsflow_api/services/form_process_mapper.py @@ -801,7 +801,10 @@ def validate_form_name_path_title(request, **kwargs): name = request.args.get("name") path = request.args.get("path") form_id = request.args.get("id") - current_app.logger.info(f"Title:{title}, Name:{name}, Path:{path}") + parent_form_id = request.args.get("parentFormId") + current_app.logger.info( + f"Title:{title}, Name:{name}, Path:{path}, form_id:{form_id}, parent_form_id: {parent_form_id}" + ) # Check if at least one query parameter is provided if not (title or name or path): @@ -819,7 +822,7 @@ def validate_form_name_path_title(request, **kwargs): path = f"{tenant_key}-{path}" # Validate title exists validation on mapper & path, name in formio. if title: - FormProcessMapperService.validate_form_title(title) + FormProcessMapperService.validate_form_title(title, parent_form_id) # Validate path, name exits in formio. if path or name: query_params = f"name={name}&path={path}&select=title,path,name"