mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-28 10:28:36 +00:00
fix: panic in reports controller (#7220)
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
e56c795143
commit
1422fe6b44
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ func (c *controller) aggregateReports(ctx context.Context, uid types.UID) (kyver
|
|||
}
|
||||
// if we have an aggregated report available, compute results
|
||||
var errs []error
|
||||
if aggregated != nil {
|
||||
if aggregated != nil && len(aggregated.GetOwnerReferences()) != 0 {
|
||||
owner := aggregated.GetOwnerReferences()[0]
|
||||
resource := corev1.ObjectReference{
|
||||
APIVersion: owner.APIVersion,
|
||||
|
|
Loading…
Add table
Reference in a new issue