Account() doesn't correctly get account details #26
Labels
bug
Something isn't working
resolved in dev
Resolved in the dev branch, but not committed to main yet.
Account() returns an array with only
['type', 'attributes']
instead of a dictionary with the account details.Expected output (something like):
{'data': {'attributes': {'apple_store_country_code': 'US', 'name': 'Example Corp'}, 'type': 'account'}}
I believe this is due to [resp_data.extend](https://github.com/macadmins/simpleMDMpy/blob/5221aa32548e2468ade4b92f700d7ebc9d826699/SimpleMDMpy/SimpleMDM.py#L40].
I think changing
resp_data
to a dictionaryresp_data = {}
and usingresp_data.update(resp_json)
might be a better approach and would resolve this.Alternatively we could leave
resp_data
as an Array and changeresp_data.extend
toresp_data.append
, which I think would resolve this.Either of these changes are likely to introduce more bugs.
The text was updated successfully, but these errors were encountered: