Merge pull request #2155 from dirrao/2142-dynamic-client-empty-results-bug
Return empty list when there is no matching resource instsnce items …
This commit is contained in:
commit
19928029d2
@ -291,6 +291,8 @@ class ResourceInstance(object):
|
||||
kind = instance['kind']
|
||||
if kind.endswith('List') and 'items' in instance:
|
||||
kind = instance['kind'][:-4]
|
||||
if not instance['items']:
|
||||
instance['items'] = []
|
||||
for item in instance['items']:
|
||||
if 'apiVersion' not in item:
|
||||
item['apiVersion'] = instance['apiVersion']
|
||||
|
||||
Loading…
Reference in New Issue
Block a user