mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
Fix bug
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user