diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-05-14 16:12:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-14 16:12:52 +0800 |
commit | a8f643c56ec9dbefa6c1ba6910b0a484eec2d91a (patch) | |
tree | 12202624d6a2dee8b3be6e6153966bb10dce66bf /models/actions | |
parent | 11552a779fc1bff2bbe1ae4f0d42f61f55337248 (diff) | |
download | gitea-a8f643c56ec9dbefa6c1ba6910b0a484eec2d91a.tar.gz gitea-a8f643c56ec9dbefa6c1ba6910b0a484eec2d91a.zip |
Fix run list broken when trigger user deleted (#24706)
Diffstat (limited to 'models/actions')
-rw-r--r-- | models/actions/run_list.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/models/actions/run_list.go b/models/actions/run_list.go index bc69c65840..18790db525 100644 --- a/models/actions/run_list.go +++ b/models/actions/run_list.go @@ -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 |