diff --git a/pkg/api/cephr.go b/pkg/api/cephr.go index 8970ac3..bc83bd2 100644 --- a/pkg/api/cephr.go +++ b/pkg/api/cephr.go @@ -289,7 +289,7 @@ func (c *cephrStore) Watch(ctx context.Context, options *metainternalversion.Lis events := make([]watch.Event, len(list.Items)) for i, pol := range list.Items { report := pol.DeepCopy() - if pol.Generation == 1 || pol.Generation == 0 { + if report.Generation == 1 || report.Generation == 0 { events[i] = watch.Event{ Type: watch.Added, Object: report, diff --git a/pkg/api/cpolr.go b/pkg/api/cpolr.go index f1ada6a..e0d6070 100644 --- a/pkg/api/cpolr.go +++ b/pkg/api/cpolr.go @@ -288,7 +288,7 @@ func (c *cpolrStore) Watch(ctx context.Context, options *metainternalversion.Lis events := make([]watch.Event, len(list.Items)) for i, pol := range list.Items { report := pol.DeepCopy() - if pol.Generation == 1 || pol.Generation == 0 { + if report.Generation == 1 || report.Generation == 0 { events[i] = watch.Event{ Type: watch.Added, Object: report, diff --git a/pkg/api/ephr.go b/pkg/api/ephr.go index eac0fa0..66c0759 100644 --- a/pkg/api/ephr.go +++ b/pkg/api/ephr.go @@ -309,7 +309,7 @@ func (p *ephrStore) Watch(ctx context.Context, options *metainternalversion.List events := make([]watch.Event, len(list.Items)) for i, pol := range list.Items { report := pol.DeepCopy() - if pol.Generation == 1 || pol.Generation == 0 { + if report.Generation == 1 || report.Generation == 0 { events[i] = watch.Event{ Type: watch.Added, Object: report, diff --git a/pkg/api/polr.go b/pkg/api/polr.go index 668ae33..c46d45a 100644 --- a/pkg/api/polr.go +++ b/pkg/api/polr.go @@ -309,7 +309,7 @@ func (p *polrStore) Watch(ctx context.Context, options *metainternalversion.List events := make([]watch.Event, len(list.Items)) for i, pol := range list.Items { report := pol.DeepCopy() - if pol.Generation == 1 || pol.Generation == 0 { + if report.Generation == 1 || report.Generation == 0 { events[i] = watch.Event{ Type: watch.Added, Object: report,