Skip to content

Commit

Permalink
Improve codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Mar 29, 2022
1 parent f440c7c commit 460cb52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion models/project/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func (Board) TableName() string {
// NumIssues return counter of all issues assigned to the board
func (b *Board) NumIssues() int {
c, err := db.GetEngine(db.DefaultContext).Table("project_issue").
Where("project_board_id=?", b.ID).
Where("project_id=?", b.ProjectID).
And("project_board_id=?", b.ID).
GroupBy("issue_id").
Cols("issue_id").
Count()
Expand Down
7 changes: 0 additions & 7 deletions models/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,6 @@ const (
TypeOrganization
)

// __________ __ __
// \______ \_______ ____ |__| ____ _____/ |_ ______
// | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\/ ___/
// | | | | \( <_> ) | \ ___/\ \___| | \___ \
// |____| |__| \____/\__| |\___ >\___ >__| /____ >
// \______| \/ \/ \/

// ErrProjectNotExist represents a "ProjectNotExist" kind of error.
type ErrProjectNotExist struct {
ID int64
Expand Down

0 comments on commit 460cb52

Please sign in to comment.