Skip to content

Commit

Permalink
loadRepoOwner must not attempt to use a nil action.Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
singuliere committed May 4, 2022
1 parent 4b4da6b commit 3fc19d8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions models/action_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func (actions ActionList) loadRepoOwner(e db.Engine, userMap map[int64]*user_mod
}

for _, action := range actions {
if action.Repo == nil {
continue
}
repoOwner, ok := userMap[action.Repo.OwnerID]
if !ok {
repoOwner, err = user_model.GetUserByID(action.Repo.OwnerID)
Expand Down

0 comments on commit 3fc19d8

Please sign in to comment.