What happened?
When I try to call update_user endpoint and update the session_time, an type mismatch error happens.
Current SDK (2.0.2) expect float
deltas=PropertiesDeltas(
^^^^^^^^^^^^^^^^^
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model_utils.py", line 49, in wrapped_init
return fn(_self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model/properties_deltas.py", line 275, in __init__
setattr(self, var_name, var_value)
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model_utils.py", line 190, in __setattr__
self[attr] = value
~~~~^^^^^^
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model_utils.py", line 511, in __setitem__
self.set_attribute(name, value)
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model_utils.py", line 162, in set_attribute
value = validate_and_convert_types(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/vinter/Projects/tmp/onesignal_be/venv/lib/python3.11/site-packages/onesignal/model_utils.py", line 1595, in validate_and_convert_types
raise get_type_error(input_value, path_to_item, valid_classes,
The actual endpoint except int64
{"errors":[{"title":"Field deltas.session_time was expecting value of type 'int64', received value of type 'number 3.14' instead"}]}
Steps to reproduce?
update_user_request = UpdateUserRequest(
deltas=PropertiesDeltas(
session_time=3,
# session_time=3.14,
session_count=3,
),
)
try:
api_response = api_instance.update_user(app_id, alias_label, alias_id, update_user_request)
pprint(api_response)
except onesignal.ApiException as e:
print("Exception when calling DefaultApi->update_user: %s\n" % e)
What did you expect to happen?
Can update the property.
Relevant log output
No response
Code of Conduct
What happened?
When I try to call
update_userendpoint and update the session_time, an type mismatch error happens.Current SDK (2.0.2) expect float
The actual endpoint except int64
Steps to reproduce?
What did you expect to happen?
Can update the property.
Relevant log output
No response
Code of Conduct