diff options
Diffstat (limited to 'python/Dawn/views.py')
| -rw-r--r-- | python/Dawn/views.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/Dawn/views.py b/python/Dawn/views.py index bf9c6b1d..a3b40ee6 100644 --- a/python/Dawn/views.py +++ b/python/Dawn/views.py @@ -399,10 +399,12 @@ def terminate(dealid, kind): {"dealid": dealid}, ) notional, terminated_amount, currency, globeop_id, cp_code = next(rec) + is_assignment = True if not termination.partial_termination: termination.termination_amount = notional - terminated_amount if termination.termination_cp is None: termination.termination_cp = cp_code + is_assignment = False session.add(termination) try: session.commit() @@ -410,7 +412,12 @@ def terminate(dealid, kind): app.logger.error(e) session.rollback() else: - buf = simple_serialize(termination, ccy=currency, globeopid=globeop_id) + buf = simple_serialize( + termination, + ccy=currency, + globeopid=globeop_id, + is_assignment=is_assignment, + ) q = get_queue() q.rpush(f"{kind}_termination", buf) return redirect(url_for("list_trades", kind=kind)) |
