Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CommandResult object has wrong definition for timestamps #7

Open
dpinte opened this issue Dec 14, 2017 · 1 comment
Open

CommandResult object has wrong definition for timestamps #7

dpinte opened this issue Dec 14, 2017 · 1 comment

Comments

@dpinte
Copy link

dpinte commented Dec 14, 2017

request_time and response_time are defined as integers in the models: https://github.com/TheJumpCloud/jcapi-python/blob/master/jcapiv1/jcapiv1/models/commandresult.py#L43

It seems the server returns strings:

Traceback (most recent call last):
  File "test_jc_cmd.py", line 61, in <module>
    test()
  File "test_jc_cmd.py", line 27, in test
    api_response = api_instance.command_results_list(content_type, accept, fields=fields, limit=limit, skip=skip, sort=sort)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/apis/command_results_api.py", line 327, in command_results_list
    (data) = self.command_results_list_with_http_info(content_type, accept, **kwargs)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/apis/command_results_api.py", line 426, in command_results_list_with_http_info
    collection_formats=collection_formats)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 326, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 161, in __call_api
    return_data = self.deserialize(response_data, response_type)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 239, in deserialize
    return self.__deserialize(data, response_type)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 257, in __deserialize
    for sub_data in data]
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 257, in <listcomp>
    for sub_data in data]
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 279, in __deserialize
    return self.__deserialize_model(data, klass)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 629, in __deserialize_model
    kwargs[attr] = self.__deserialize(value, attr_type)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 271, in __deserialize
    return self.__deserialize_primitive(data, klass)
  File "/home/dpinte/.edm/envs/testpy3/lib/python3.5/site-packages/jcapiv1/api_client.py", line 557, in __deserialize_primitive
    return klass(data)
ValueError: invalid literal for int() with base 10: '2017-12-13T23:56:55.000Z'
@jpvajda
Copy link
Contributor

jpvajda commented Mar 19, 2018

@dpinte Thanks for the feedback on this. We'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants