diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-02-02 07:33:56 -0500 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-02 20:33:56 +0800 |
commit | 73d05a51e3dce4a5b31b8660a6141a14ae615404 (patch) | |
tree | 16eb200197c0ae8458812d187184fee696c7c858 /modules/context/repo.go | |
parent | d7d094bd8a5520b758f34d3fb0439c6a1ddb39d3 (diff) | |
download | gitea-73d05a51e3dce4a5b31b8660a6141a14ae615404.tar.gz gitea-73d05a51e3dce4a5b31b8660a6141a14ae615404.zip |
Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 338a78cb93..aca1e1b63c 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -185,10 +185,8 @@ func RepoAssignment(args ...bool) macaron.Handler { ctx.Handle(500, "GetRepositoryByName", err) } return - } else if err = repo.GetOwner(); err != nil { - ctx.Handle(500, "GetOwner", err) - return } + repo.Owner = owner // Admin has super access. if ctx.IsSigned && ctx.User.IsAdmin { |