Skip to content

Commit

Permalink
fix: nil point panic
Browse files Browse the repository at this point in the history
Signed-off-by: xu.zhu <xu.zhu.work@outlook.com>
  • Loading branch information
xuzhu-591 committed Jul 4, 2024
1 parent fbca5de commit 8d365d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/eventhandler/wlgenerator/wlgenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (w *WebhookLogGenerator) listAssociatedResourcesOfCluster(ctx context.Conte
func (w *WebhookLogGenerator) listAssociatedResourcesOfPipelinerun(ctx context.Context,
id uint) (*prmodels.Pipelinerun, *clustermodels.Cluster, map[string][]uint) {
pr, err := w.prMgr.PipelineRun.GetByID(ctx, id)
if err != nil {
if err != nil || pr == nil {
log.Warningf(ctx, "pipelinerun %d is not exist",
id)
return nil, nil, nil
Expand Down

0 comments on commit 8d365d3

Please sign in to comment.