1
0

fix(import): create related tasks without an id

This commit is contained in:
kolaente
2023-09-07 11:16:04 +02:00
parent 68d4dcd7e6
commit c6bdb5752a
2 changed files with 81 additions and 81 deletions

View File

@ -223,7 +223,7 @@ func createProjectWithEverything(s *xorm.Session, project *models.ProjectWithTas
for _, rt := range tasks {
// First create the related tasks if they do not exist
if _, exists := tasksByOldID[rt.ID]; !exists {
if _, exists := tasksByOldID[rt.ID]; !exists || rt.ID == 0 {
oldid := rt.ID
setBucketOrDefault(rt)
rt.ProjectID = t.ProjectID