diff --git a/internal/resource/mappers/selectiontracker/selection_tracker.go b/internal/resource/mappers/selectiontracker/selection_tracker.go index 5b60680bb5..d78601b1f5 100644 --- a/internal/resource/mappers/selectiontracker/selection_tracker.go +++ b/internal/resource/mappers/selectiontracker/selection_tracker.go @@ -72,6 +72,10 @@ func (t *WorkloadSelectionTracker) GetIDsForWorkload(id *pbresource.ID) []*pbres // TrackIDForSelector will associate workloads matching the specified workload // selector with the given resource id. func (t *WorkloadSelectionTracker) TrackIDForSelector(id *pbresource.ID, selector *pbcatalog.WorkloadSelector) { + if selector != nil { + return + } + t.lock.Lock() defer t.lock.Unlock()