macxred / cashctrl_ledger

Implementation of the abstract pyledger.LegderEngine interface with CashCtrl accounting service.
MIT License
0 stars 0 forks source link

feat: activate ignore_account_root_nodes option #42

Closed AlexTheWizardL closed 3 months ago

AlexTheWizardL commented 3 months ago

This PR covers following changes:

  1. Add an option ignore_account_root_nodes: bool = False to CashCtrlClient.update_categories(). When set, we silently ignore additions, updates and deletions of root account categories.
  2. Modify mirror_account_chart() to activate this option. Remove trick on ledger.py#L140 that ignores root node most of the time but fails to work in some circumstance.

First commit - shows the issue exist with the new test suit Second commit - fixes the issue

@lasuk Please review the changes and provide feedback or approval for merging.

lasuk commented 3 months ago

Nice. Thanks a lot!