mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* Fix for type error The empty type here should be a dict, not a list as is has a `get` done on it next. * Return dict directly to avoid failing key lookup
This commit is contained in:
committed by
Martin Krizek
parent
8768c05d3e
commit
e02524dd58
@@ -175,7 +175,7 @@ class InventoryModule(BaseInventoryPlugin, Cacheable):
|
||||
url = "%s/api/v2/hosts/%s" % (self.foreman_url, hid)
|
||||
ret = self._get_json(url, [404])
|
||||
if not ret or not isinstance(ret, MutableMapping) or not ret.get('all_parameters', False):
|
||||
ret = []
|
||||
return {}
|
||||
return ret.get('all_parameters')
|
||||
|
||||
def _get_facts_by_id(self, hid):
|
||||
|
||||
Reference in New Issue
Block a user