Fixed bug where migration failed if no teamless board existed

This commit is contained in:
Harshil Sharma 2022-03-28 11:58:26 +05:30
parent 98ca5b5691
commit e51edd4df5

View file

@ -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