mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-21 12:55:23 +02:00
Fix bug
This commit is contained in:
parent
5d849cea33
commit
c61ac24c1c
@ -186,7 +186,7 @@ func repoAssignment() func(ctx *context.APIContext) {
|
|||||||
repo.Owner = owner
|
repo.Owner = owner
|
||||||
ctx.Repo.Repository = repo
|
ctx.Repo.Repository = repo
|
||||||
|
|
||||||
if ctx.Doer.ID == user_model.BotUserID {
|
if ctx.Doer != nil && ctx.Doer.ID == user_model.BotUserID {
|
||||||
ctx.Repo.Permission.AccessMode = perm_model.AccessModeAdmin
|
ctx.Repo.Permission.AccessMode = perm_model.AccessModeAdmin
|
||||||
if err := ctx.Repo.Repository.LoadUnits(ctx); err != nil {
|
if err := ctx.Repo.Repository.LoadUnits(ctx); err != nil {
|
||||||
ctx.Error(http.StatusInternalServerError, "LoadUnits", err)
|
ctx.Error(http.StatusInternalServerError, "LoadUnits", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user