0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-23 10:34:40 +01:00

Fix run list broken when trigger user deleted (#24706)

This commit is contained in:
Lunny Xiao 2023-05-14 16:12:52 +08:00 committed by GitHub
parent 11552a779f
commit a8f643c56e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,9 @@ func (runs RunList) LoadTriggerUser(ctx context.Context) error {
run.TriggerUser = user_model.NewActionsUser()
} else {
run.TriggerUser = users[run.TriggerUserID]
if run.TriggerUser == nil {
run.TriggerUser = user_model.NewGhostUser()
}
}
}
return nil