diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-11 00:01:38 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-11 00:01:38 -0400 |
commit | 65c2c629825c527085e5a0ab09dad9ebbf323aaa (patch) | |
tree | 1767d4ae6f44a4f669a587af6fc5d35be3f9bd19 | |
parent | f8e370f8ca60acdc14d0ca667d971662c7f7e2d5 (diff) | |
download | gitea-65c2c629825c527085e5a0ab09dad9ebbf323aaa.tar.gz gitea-65c2c629825c527085e5a0ab09dad9ebbf323aaa.zip |
Bug fix
-rw-r--r-- | modules/middleware/repo.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index df575f30c0..258fc9d2ab 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -15,6 +15,7 @@ import ( "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/base" + "github.com/gogits/gogs/modules/log" ) func RepoAssignment(redirect bool, args ...bool) martini.Handler { @@ -160,7 +161,11 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { } ctx.Data["BranchName"] = ctx.Repo.BranchName - ctx.Data["Branches"], _ = models.GetBranches(user.Name, repoName) + brs, err := models.GetBranches(user.Name, repoName) + if err != nil { + log.Error("RepoAssignment(GetBranches): %v", err) + } + ctx.Data["Branches"] = brs ctx.Data["CommitId"] = ctx.Repo.CommitId ctx.Data["IsRepositoryWatching"] = ctx.Repo.IsWatching } |