Skip to content

Commit

Permalink
[DEPLOY] Fix CID lookup helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jshcodes committed Sep 12, 2021
1 parent 1e7a9f3 commit 1a105b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/falconpytools/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
For more information, please refer to <https://unlicense.org>
"""
_VERSION = '0.0.15'
_VERSION = '0.0.16'
_MAINTAINER = 'Joshua Hiller'
_AUTHOR = 'CrowdStrike'
_AUTHOR_EMAIL = '[email protected]'
Expand Down
5 changes: 3 additions & 2 deletions src/falconpytools/hosts/_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ def get_host(self: object, aid: str):
def get_cid(self: object):
"""Retrieves the CID by looking at the first host"""
self.display("Retrieving CID")
result = self.api.hosts.query_devices_by_filter()
result = self.api.hosts.get_device_details(
ids=self.api.hosts.query_devices_by_filter()["body"]["resources"][0]
)
if not result["body"]["resources"]:
returned = False
else:
print(result)
returned = result["body"]["resources"][0]["cid"]

return returned

0 comments on commit 1a105b3

Please sign in to comment.