ovirt correct resolving nested atributes which are false (#63908)
This commit is contained in:
parent
5e9638c869
commit
92d6212026
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ def get_dict_of_struct(struct, connection=None, fetch_nested=False, attributes=N
|
|||
value = None
|
||||
nested_obj = dict(
|
||||
(attr, convert_value(getattr(value, attr)))
|
||||
for attr in attributes if getattr(value, attr, None)
|
||||
for attr in attributes if getattr(value, attr, None) is not None
|
||||
)
|
||||
nested_obj['id'] = getattr(value, 'id', None)
|
||||
nested_obj['href'] = getattr(value, 'href', None)
|
||||
|
|
Loading…
Reference in a new issue