mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-08 17:05:45 +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
|
||||
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
|
||||
if err := ctx.Repo.Repository.LoadUnits(ctx); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "LoadUnits", err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user