From d35c30dd0c19cea9521810e2aa97bb01800270ce Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 3 Dec 2023 14:14:27 +0100 Subject: [PATCH] fix(import): make sure importing works if parent / child projects are created in a different order Resolves https://community.vikunja.io/t/migrating-from-self-hosted-instance/1805 --- pkg/modules/migration/create_from_structure.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/modules/migration/create_from_structure.go b/pkg/modules/migration/create_from_structure.go index b63a6c03dcb..c11e474b0ee 100644 --- a/pkg/modules/migration/create_from_structure.go +++ b/pkg/modules/migration/create_from_structure.go @@ -60,6 +60,7 @@ func insertFromStructure(s *xorm.Session, str []*models.ProjectWithTasksAndBucke if p.ParentProjectID != 0 { childRelations[p.ParentProjectID] = append(childRelations[p.ParentProjectID], oldID) + p.ParentProjectID = 0 } p.ID = 0