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

reject_leave_application: TypeError: 'NoneType' object is not iterable #131

Open
Denhai opened this issue May 23, 2024 · 2 comments
Open

Comments

@Denhai
Copy link

Denhai commented May 23, 2024

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:

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}
Copy link

PETOSS-424

Copy link

Thanks for raising an issue, a ticket has been created to track your request

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

No branches or pull requests

1 participant