macxred / cashctrl_api

Python client for the CashCtrl REST API
MIT License
0 stars 0 forks source link

Ignore account root nodes in update_categories() #32

Closed lasuk closed 2 months ago

lasuk commented 2 months ago

Account category root nodes are immutable in CashCtrl. We silently ignore them when updating or deleting account categories.

Fixes below error when mirroring an account chart in which the /Balance category has no sub-nodes:

>>> cc_ledger.mirror_account_chart(accounts, delete=True)
requests.exceptions.RequestException: API call failed. A system-category cannot be deleted.
lasuk commented 2 months ago

We should extend tests to cover this option.