pass the the correct model to id on create

This commit is contained in:
jasquat 2022-11-19 17:18:46 -05:00
parent 9c08e70d6a
commit 296a902f52
1 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,6 @@ export default function ProcessModelForm({
useState<boolean>(false);
const [displayNameInvalid, setDisplayNameInvalid] = useState<boolean>(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}`,
});
}