From a8f643c56ec9dbefa6c1ba6910b0a484eec2d91a Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sun, 14 May 2023 16:12:52 +0800 Subject: [PATCH] Fix run list broken when trigger user deleted (#24706) --- models/actions/run_list.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models/actions/run_list.go b/models/actions/run_list.go index bc69c6584..18790db52 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