1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-15 23:17:19 +00:00

Remove unneeded database loads (#814)

Remove unnecessary calls to repo.GetOwner() in context handlers
This commit is contained in:
Ethan Koenig
2017-02-02 07:33:56 -05:00
committed by Lunny Xiao
parent d7d094bd8a
commit 73d05a51e3
2 changed files with 2 additions and 6 deletions

View File

@@ -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 {