diff options
Diffstat (limited to 'python/Dawn/views.py')
| -rw-r--r-- | python/Dawn/views.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/python/Dawn/views.py b/python/Dawn/views.py index c6df3ed8..56bf0497 100644 --- a/python/Dawn/views.py +++ b/python/Dawn/views.py @@ -426,10 +426,9 @@ def terminate(dealid, kind): ccy=currency, globeopid=globeop_id, is_assignment=is_assignment, - fund=fund, ) q = get_queue() - q.rpush(f"{kind}_termination", buf) + q.rpush(f"{kind}_{fund}_termination", buf) return redirect(url_for("list_trades", kind=kind)) else: return render_template( @@ -607,10 +606,12 @@ def get_bbg_id(): indextype = indextype[:2] tenor = tenor[:-1] + "yr" series = int(series[1:]) - sql_str = ("SELECT redindexcode, maturity, coupon " - "FROM index_desc " - "WHERE index=%s and series=%s and tenor=%s " - " and lastdate >=%s ORDER BY version") + sql_str = ( + "SELECT redindexcode, maturity, coupon " + "FROM index_desc " + "WHERE index=%s and series=%s and tenor=%s " + " and lastdate >=%s ORDER BY version" + ) db = get_db() with db.cursor() as c: c.execute(sql_str, (indextype, series, tenor, trade_date)) |
