Open Denhai opened 5 months ago
xero_tenant_id = '7f8441b3-9d6c-499b-b28d-1250928c7b65' leave_application_id = 'd306a1fe-301e-4126-beef-8d72fdf8105a' payroll_au_api.reject_leave_application(xero_tenant_id, leave_application_id)
File .../.direnv/python-3.11/lib/python3.11/site-packages/xero_python/api_client/deserializer.py:78, in deserialize_list(data_type, data, model_finder) 76 raise ValueError("Can't deserialize data_type={!r}".format(data_type)) 77 else: ---> 78 return [deserialize(sub_data_type, sub_data, model_finder) for sub_data in data] TypeError: 'NoneType' object is not iterable
If I turn off deserialization with _preload_content=False, you can see where the None is coming from:
_preload_content=False
None
response = payroll_au_api.reject_leave_application( xero_tenant_id, leave_application_id, _preload_content=False ) response.json() {'Id': '0945c9d4-3333-4cab-976f-0e877e9ba22b', 'Status': 'OK', 'ProviderName': 'Attendance DEV Hayden', 'DateTimeUTC': '/Date(1716438447128)/', 'LeaveApplications': None}
PETOSS-424
Thanks for raising an issue, a ticket has been created to track your request
If I turn off deserialization with
_preload_content=False
, you can see where theNone
is coming from: