Skip to content

Commit

Permalink
Merge pull request #2409 from auslin-aot/fwf-4055-accept-process-type…
Browse files Browse the repository at this point in the history
…-data-for-duplicate-forms

FWF-4055: [Bugfix] On duplicate form create process with processType & data from payload
  • Loading branch information
arun-s-aot authored Dec 9, 2024
2 parents 30fb11d + 6ac4de7 commit 58d9c10
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions forms-flow-api/src/formsflow_api/services/form_process_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,16 @@ def create_form(data, is_designer, **kwargs): # pylint:disable=too-many-locals
process_name = (
updated_process_name if updated_process_name else process_name
)
# create entry in process with default flow.
FormProcessMapperService.create_default_process(process_name)
process_data = data.get("processData")
process_type = data.get("processType")
if process_data and process_type:
# Incase of duplicate form we get process data from payload
ProcessService.create_process(
process_data, process_type, process_name, process_name
)
else:
# create entry in process with default flow.
FormProcessMapperService.create_default_process(process_name)
return response

def _remove_tenant_key(self, form_json, tenant_key):
Expand Down

0 comments on commit 58d9c10

Please sign in to comment.