diff --git a/gogs.go b/gogs.go index 390345561..aa0e5752f 100644 --- a/gogs.go +++ b/gogs.go @@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.9.136.0209" +const APP_VER = "0.9.137.0209" func init() { setting.AppVer = APP_VER diff --git a/models/pull.go b/models/pull.go index cb52a302d..7aaffe43f 100644 --- a/models/pull.go +++ b/models/pull.go @@ -621,18 +621,18 @@ func (pr *PullRequest) AddToTaskQueue() { type PullRequestList []*PullRequest -func (prs PullRequestList) loadAttributes(e Engine) error { +func (prs PullRequestList) loadAttributes(e Engine) (err error) { if len(prs) == 0 { return nil } - // Load issues. + // Load issues issueIDs := make([]int64, 0, len(prs)) for i := range prs { issueIDs = append(issueIDs, prs[i].IssueID) } issues := make([]*Issue, 0, len(issueIDs)) - if err := e.Where("id > 0").In("id", issueIDs).Find(&issues); err != nil { + if err = e.Where("id > 0").In("id", issueIDs).Find(&issues); err != nil { return fmt.Errorf("find issues: %v", err) } @@ -643,6 +643,14 @@ func (prs PullRequestList) loadAttributes(e Engine) error { for i := range prs { prs[i].Issue = set[prs[i].IssueID] } + + // Load attributes + for i := range prs { + if err = prs[i].loadAttributes(e); err != nil { + return fmt.Errorf("loadAttributes [%d]: %v", prs[i].ID, err) + } + } + return nil } diff --git a/templates/.VERSION b/templates/.VERSION index 261c64d56..f0ed141e5 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.9.136.0209 \ No newline at end of file +0.9.137.0209 \ No newline at end of file