ovirt: Fix fetching of nested attributes (#61841)

This patch is fixing the fetching of nested attributes.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1748025
This commit is contained in:
Ondra Machacek 2019-10-18 14:40:41 +02:00 committed by John R Barker
parent 4e50096663
commit 5b2d625eb7

View file

@ -102,7 +102,7 @@ def get_dict_of_struct(struct, connection=None, fetch_nested=False, attributes=N
ret = [] ret = []
for i in value: for i in value:
if isinstance(i, sdk.Struct): if isinstance(i, sdk.Struct):
if fetch_nested and i.href: if not nested and fetch_nested and i.href:
ret.append(resolve_href(i)) ret.append(resolve_href(i))
elif not nested: elif not nested:
ret.append(get_dict_of_struct(i)) ret.append(get_dict_of_struct(i))