aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/utils.py')
-rw-r--r--python/Dawn/utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/Dawn/utils.py b/python/Dawn/utils.py
index 75ef43d7..8fa45e93 100644
--- a/python/Dawn/utils.py
+++ b/python/Dawn/utils.py
@@ -10,4 +10,10 @@ def bump_rev(filename):
return "{0} rev{1}.pdf".format(begin, rev_number)
def simple_serialize(obj):
- return dumps({c.name: getattr(obj, c.name) for c in obj.__table__.columns})
+ 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})
+ return dumps(d)