From 2bacbd3cbed3a1b11026c63462dfbc95743201c2 Mon Sep 17 00:00:00 2001 From: jasquat Date: Sat, 19 Nov 2022 17:18:46 -0500 Subject: [PATCH] pass the the correct model to id on create --- spiffworkflow-frontend/src/components/ProcessModelForm.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessModelForm.tsx b/spiffworkflow-frontend/src/components/ProcessModelForm.tsx index 532e39279..9725f2422 100644 --- a/spiffworkflow-frontend/src/components/ProcessModelForm.tsx +++ b/spiffworkflow-frontend/src/components/ProcessModelForm.tsx @@ -24,7 +24,6 @@ export default function ProcessModelForm({ useState(false); const [displayNameInvalid, setDisplayNameInvalid] = useState(false); const navigate = useNavigate(); - const modifiedProcessModelPath = modifyProcessModelPath(processModel.id); const navigateToProcessModel = (result: ProcessModel) => { if ('id' in result) { @@ -53,7 +52,7 @@ export default function ProcessModelForm({ if (hasErrors) { return; } - const path = `/process-models/${modifiedProcessModelPath}`; + const path = `/process-models/${processGroupId}`; let httpMethod = 'POST'; if (mode === 'edit') { httpMethod = 'PUT'; @@ -64,7 +63,7 @@ export default function ProcessModelForm({ }; if (mode === 'new') { Object.assign(postBody, { - id: `${processGroupId}:${processModel.id}`, + id: `${processGroupId}/${processModel.id}`, }); }