1
0

fix: remove leftovers of childIds

This commit is contained in:
kolaente
2023-04-12 11:37:08 +02:00
parent a2cc9ddc88
commit bbaddb9406
3 changed files with 0 additions and 13 deletions

View File

@ -110,15 +110,6 @@ export const useProjectStore = defineStore('project', () => {
const cancel = setModuleLoading(setIsLoading)
const projectService = new ProjectService()
const oldProject = projects.value[project.id]
if (oldProject && oldProject.parentProjectId !== project.parentProjectId && oldProject.parentProjectId > 0) {
const parentProject = projects.value[oldProject.parentProjectId]
if (parentProject) {
const childProjectIndex = parentProject.childProjectIds.findIndex(pId => pId === project.id)
parentProject.childProjectIds.splice(childProjectIndex, 1)
}
}
try {
await projectService.update(project)
setProject(project)