Skip to content

Commit 460cb52

Browse files
committed
Improve codes
1 parent f440c7c commit 460cb52

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

models/project/board.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func (Board) TableName() string {
6161
// NumIssues return counter of all issues assigned to the board
6262
func (b *Board) NumIssues() int {
6363
c, err := db.GetEngine(db.DefaultContext).Table("project_issue").
64-
Where("project_board_id=?", b.ID).
64+
Where("project_id=?", b.ProjectID).
65+
And("project_board_id=?", b.ID).
6566
GroupBy("issue_id").
6667
Cols("issue_id").
6768
Count()

models/project/project.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ const (
3939
TypeOrganization
4040
)
4141

42-
// __________ __ __
43-
// \______ \_______ ____ |__| ____ _____/ |_ ______
44-
// | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\/ ___/
45-
// | | | | \( <_> ) | \ ___/\ \___| | \___ \
46-
// |____| |__| \____/\__| |\___ >\___ >__| /____ >
47-
// \______| \/ \/ \/
48-
4942
// ErrProjectNotExist represents a "ProjectNotExist" kind of error.
5043
type ErrProjectNotExist struct {
5144
ID int64

0 commit comments

Comments
 (0)