mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-08-30 09:07:40 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user