mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Fix bug in data returns for some queries used by facts module (#52832)
* Fix bug in data returns for some queries used by facts module * Add additional query to return all servers (up to 5000) * Fix key checking in rest_api
This commit is contained in:
committed by
John R Barker
parent
be293fbe50
commit
e8cddfd452
@@ -190,8 +190,9 @@ class IntersightModule():
|
||||
except Exception as e:
|
||||
self.module.fail_json(msg="API error: %s " % str(e))
|
||||
|
||||
if response.length > 0:
|
||||
return json.loads(response.read())
|
||||
response_data = response.read()
|
||||
if len(response_data) > 0:
|
||||
return json.loads(response_data)
|
||||
return {}
|
||||
|
||||
def intersight_call(self, http_method="", resource_path="", query_params=None, body=None, moid=None, name=None):
|
||||
|
||||
Reference in New Issue
Block a user