Skip to content

Commit

Permalink
using accountant ledger in action get params (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
sameer-639 authored Apr 19, 2024
1 parent 5d154be commit 465fe11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions pyluca/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import json
from typing import Union
from pyluca.accountant import Accountant
from pyluca.ledger import Ledger
from pyluca.event import Event

_OPERATOR_CONFIG = {
Expand Down Expand Up @@ -47,7 +46,7 @@ def _get_param(
next_key = key.replace('context.', '')
return _get_param(context[next_key], event, accountant, context)
if key.startswith('balance.'):
return Ledger(accountant.journal, accountant.config).get_account_balance(key.replace('balance.', ''))
return accountant.ledger.get_account_balance(key.replace('balance.', ''))
if hasattr(event, key):
return event.__getattribute__(key)
raise NotImplementedError(f'param {key} not implemented')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setuptools.setup(
name='pyluca',
version='3.1.1',
version='3.1.2',
author='datasignstech',
author_email='[email protected]',
description='Double entry accounting system',
Expand Down

0 comments on commit 465fe11

Please sign in to comment.