more context for models (#19511)
make more usage of context, to have more db transaction in one session (make diff of #9307 smaller)
This commit is contained in:
parent
332b2ecd21
commit
06e4687cec
54 changed files with 275 additions and 245 deletions
|
@ -183,7 +183,7 @@ func repoAssignment() func(ctx *context.APIContext) {
|
|||
repo.Owner = owner
|
||||
ctx.Repo.Repository = repo
|
||||
|
||||
ctx.Repo.Permission, err = models.GetUserRepoPermission(repo, ctx.Doer)
|
||||
ctx.Repo.Permission, err = models.GetUserRepoPermission(ctx, repo, ctx.Doer)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "GetUserRepoPermission", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue