fix(migration): abort import on unexpected task creation error

Non-empty-title errors from task creation fell through silently and the
loop kept using a task with ID 0, attaching relations and labels to id
0. Return the error instead; empty titles keep being skipped.
This commit is contained in:
kolaente
2026-08-02 16:21:50 +02:00
parent 57bfd1cae2
commit ba980b1b8e
@@ -356,8 +356,11 @@ func createProjectWithEverything(s *xorm.Session, project *models.ProjectWithTas
originalBucketID := t.BucketID
t.BucketID = 0
err = t.Create(s, user)
if err != nil && models.IsErrTaskCannotBeEmpty(err) {
continue
if err != nil {
if models.IsErrTaskCannotBeEmpty(err) {
continue
}
return err
}
t.BucketID = originalBucketID