Skip to content

Commit

Permalink
Fix the _id key #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Agam committed Feb 6, 2019
1 parent d5211c8 commit 52ab6b3
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions Integrations/integration-IntSights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1648,11 +1648,16 @@ script:
if not accounts:
return_error("intsights-mssp-get-sub-accounts failed to return data.")
# Fix accounts _id keys
for account in accounts:
account["ID"] = account["_id"]
del account["_id"]
demisto.results({
'Type': entryTypes['note'],
'EntryContext': {'IntSights.MsspAccounts(val.ID === obj.ID)': accounts},
'HumanReadable': tableToMarkdown('IntSights MSSP accounts for ' + account_id, [a for a in accounts],
["_id", 'CompanyName', "Status"]),
["ID", 'CompanyName', "Status"]),
'Contents': accounts,
'ContentsFormat': formats['json']
})
Expand Down Expand Up @@ -1699,11 +1704,16 @@ script:
accounts[0].update(json.loads(account_1_ua))
accounts[1].update(json.loads(account_2_ua))
# Fix accounts _id keys
for account in accounts:
account["ID"] = account["_id"]
del account["_id"]
demisto.results({
'Type': entryTypes['note'],
'EntryContext': {'IntSights.MsspAccounts(val.ID === obj.ID)': accounts},
'HumanReadable': tableToMarkdown('IntSights MSSP accounts used assets ' + account_id, [a for a in accounts], \
["_id", 'CompanyName', "Status", "AssetsLimit", "AssetsCount"]),
'HumanReadable': tableToMarkdown('IntSights MSSP accounts used assets ' + account_id, [a for a in accounts],
["ID", 'CompanyName', "Status", "AssetsLimit", "AssetsCount"]),
'Contents': accounts,
'ContentsFormat': formats['json']
})
Expand Down

0 comments on commit 52ab6b3

Please sign in to comment.