Browse code

Ovirt fix fetching of nested attributes backport (#63787)

* 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

* add changelog

Martin Nečas authored on 2019/11/13 04:40:40
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,3 @@
0
+---
1
+bugfixes:
2
+- "ovirt: Fix fetching of nested attributes"
... ...
@@ -102,7 +102,7 @@ def get_dict_of_struct(struct, connection=None, fetch_nested=False, attributes=N
102 102
             ret = []
103 103
             for i in value:
104 104
                 if isinstance(i, sdk.Struct):
105
-                    if fetch_nested and i.href:
105
+                    if not nested and fetch_nested and i.href:
106 106
                         ret.append(resolve_href(i))
107 107
                     elif not nested:
108 108
                         ret.append(get_dict_of_struct(i))