Update listwatch.go

This commit is contained in:
andreihagiescu-db 2021-02-22 13:05:09 -05:00 committed by GitHub
parent 8b2ef33df1
commit 6ee0f9255e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -53,6 +53,10 @@ func (s *shardedListWatch) List(options metav1.ListOptions) (runtime.Object, err
if err != nil {
return nil, err
}
metaObj, err := meta.ListAccessor(list)
if err != nil {
return nil, err
}
res := &metav1.List{
Items: []runtime.RawExtension{},
}
@ -66,7 +70,6 @@ func (s *shardedListWatch) List(options metav1.ListOptions) (runtime.Object, err
}
}
metaObj, err := meta.ListAccessor(list)
res.ListMeta.ResourceVersion = metaObj.GetResourceVersion()
return res, nil