diff --git a/src/stores/projects.ts b/src/stores/projects.ts index 6586fb14d..395c7e1be 100644 --- a/src/stores/projects.ts +++ b/src/stores/projects.ts @@ -232,8 +232,11 @@ export function useProject(projectId: MaybeRef) { ) async function save() { - project.parentProjectId = parentProject.value.id - await projectStore.updateProject(project) + const updatedProject = await projectStore.updateProject({ + ...project, + parentProjectId: parentProject.value.id ?? project.parentProjectId, + }) + Object.assign(project, updatedProject) success({message: t('project.edit.success')}) }