Fixed bug where migration failed if no teamless board existed (#2648)

This commit is contained in:
Harshil Sharma 2022-03-28 13:32:01 +05:30 committed by GitHub
parent d0d18f207f
commit 3e07ba0d9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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