diff options
Diffstat (limited to 'python/Dawn/utils.py')
| -rw-r--r-- | python/Dawn/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/Dawn/utils.py b/python/Dawn/utils.py index 9a2cf37f..731d6dbb 100644 --- a/python/Dawn/utils.py +++ b/python/Dawn/utils.py @@ -9,11 +9,12 @@ def bump_rev(filename): return f"{begin} rev{rev_number}.pdf" -def simple_serialize(obj): +def simple_serialize(obj, **kwargs): d = {c.name: getattr(obj, c.name) for c in obj.__table__.columns} # add data from foreign relationship if obj.__table__.name == 'wires': d.update({'Counterparty': obj.account.counterparty, 'cashaccount': obj.account.cash_account, 'custodian': obj.account.custodian}) + d.update(kwargs) return dumps(d) |
