Skip to content

Commit 9207a4e

Browse files
committed
remove not used code
Signed-off-by: a1012112796 <[email protected]>
1 parent 092c46d commit 9207a4e

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

models/project/board.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -217,19 +217,6 @@ func GetBoard(ctx context.Context, boardID int64) (*Board, error) {
217217
return board, nil
218218
}
219219

220-
// GetBoard fetches the current default board of a project
221-
func GetDefaultBoard(ctx context.Context, projectID int64) (*Board, error) {
222-
board := new(Board)
223-
has, err := db.GetEngine(ctx).Where("project_id = ? AND `default` = ?", projectID, true).Get(board)
224-
if err != nil {
225-
return nil, err
226-
} else if !has {
227-
return nil, ErrProjectBoardNotExist{BoardID: -1}
228-
}
229-
230-
return board, nil
231-
}
232-
233220
// UpdateBoard updates a project board
234221
func UpdateBoard(ctx context.Context, board *Board) error {
235222
var fieldToUpdate []string

models/project/issue.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ func (issue *ProjectIssue) LoadProjectBoard(ctx context.Context) error {
6969

7070
var err error
7171

72-
if issue.ProjectBoardID == 0 {
73-
issue.ProjectBoard, err = GetDefaultBoard(ctx, issue.ProjectID)
74-
return err
75-
}
76-
7772
issue.ProjectBoard, err = GetBoard(ctx, issue.ProjectBoardID)
7873
return err
7974
}

0 commit comments

Comments
 (0)