From 3e07ba0d9e738c353c338a6fcb4e67f55618849e Mon Sep 17 00:00:00 2001 From: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com> Date: Mon, 28 Mar 2022 13:32:01 +0530 Subject: [PATCH] Fixed bug where migration failed if no teamless board existed (#2648) --- server/services/store/sqlstore/migrate.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/services/store/sqlstore/migrate.go b/server/services/store/sqlstore/migrate.go index 63b681403..c59a914ff 100644 --- a/server/services/store/sqlstore/migrate.go +++ b/server/services/store/sqlstore/migrate.go @@ -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