Skip to content

Commit

Permalink
Fixed bug where migration failed if no teamless board existed
Browse files Browse the repository at this point in the history
  • Loading branch information
harshilsharma63 committed Mar 28, 2022
1 parent 98ca5b5 commit e51edd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/services/store/sqlstore/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,12 @@ func (s *SQLStore) getDMBoards(tx sq.BaseRunner) ([]*model.Board, error) {
},
}

return s.getBoardsByCondition(tx, conditions)
boards, err := s.getBoardsByCondition(tx, conditions)
if err != nil && errors.Is(err, sql.ErrNoRows) {
return []*model.Board{}, nil
}

return boards, err
}

// The destination is selected as the first team where all members
Expand Down

0 comments on commit e51edd4

Please sign in to comment.