Skip to content

Commit

Permalink
Merge pull request #2455 from auslin-aot/bugfix/fwf-4120-added-parent…
Browse files Browse the repository at this point in the history
…-form-id-validate-query-param

FWF-4120: [Bugfix] Added parentFormId to validation query
  • Loading branch information
arun-s-aot authored Dec 20, 2024
2 parents 962ad40 + 98e8c6a commit d5fb8a6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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"
Expand Down

0 comments on commit d5fb8a6

Please sign in to comment.