diff options
Diffstat (limited to 'python/Dawn')
| -rw-r--r-- | python/Dawn/views.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/Dawn/views.py b/python/Dawn/views.py index ab334c15..2cc5447b 100644 --- a/python/Dawn/views.py +++ b/python/Dawn/views.py @@ -394,7 +394,8 @@ def terminate(dealid, kind): form.populate_obj(termination) sql_session = form.get_session() rec = db.session.execute( - "SELECT notional, coalesce(terminated_amount, 0.), currency, b.globeop_id, cp_code " + "SELECT notional, coalesce(terminated_amount, 0.), currency, b.globeop_id, " + "cp_code, fund " f"FROM {table} " "LEFT JOIN " "(SELECT dealid, sum(termination_amount) AS terminated_amount " @@ -407,7 +408,7 @@ def terminate(dealid, kind): "WHERE dealid = :dealid", {"dealid": dealid, "date": termination.termination_date}, ) - notional, terminated_amount, currency, globeop_id, cp_code = next(rec) + notional, terminated_amount, currency, globeop_id, cp_code, fund = next(rec) is_assignment = True if not termination.partial_termination: termination.termination_amount = notional - terminated_amount @@ -426,6 +427,7 @@ def terminate(dealid, kind): ccy=currency, globeopid=globeop_id, is_assignment=is_assignment, + fund=fund, ) q = get_queue() q.rpush(f"{kind}_termination", buf) |
