mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-26 21:33:12 +00:00
fix "TypeError: Object of type map is not JSON serializable" (#223)
Fix TypeError for manageiq_provider module.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- manageiq_provider - fix serialization error when running on python3 environment.
|
||||
@@ -571,7 +571,7 @@ def delete_nulls(h):
|
||||
a hash without nulls
|
||||
"""
|
||||
if isinstance(h, list):
|
||||
return map(delete_nulls, h)
|
||||
return [delete_nulls(i) for i in h]
|
||||
if isinstance(h, dict):
|
||||
return dict((k, delete_nulls(v)) for k, v in h.items() if v is not None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user