xero-python icon indicating copy to clipboard operation
xero-python copied to clipboard

Invalid value for `invoice` after deleting credit note allocation

Open ton77v opened this issue 1 year ago • 2 comments

Using xero_python==6.3.0

To reproduce:

api_client = ApiClient(...)
accounting_api = AccountingApi(_api_client)

...

accounting_api.delete_credit_note_allocations(
    xero_tenant_id=XERO_TENANT_ID,
    credit_note_id=credit_note_id,
    allocation_id=allocation_id,
)

The allocation will be deleted, however ValueError "Invalid value for invoice, must not be None" will be raised.

It's likely caused by response_type="Allocation" here: https://github.com/XeroAPI/xero-python/blob/master/xero_python/accounting/api/accounting_api.py#L5853

ton77v avatar Oct 09 '24 08:10 ton77v

PETOSS-641

github-actions[bot] avatar Oct 09 '24 08:10 github-actions[bot]

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

github-actions[bot] avatar Oct 09 '24 08:10 github-actions[bot]