diff options
Diffstat (limited to 'python/Dawn/views.py')
| -rw-r--r-- | python/Dawn/views.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/python/Dawn/views.py b/python/Dawn/views.py index 086d7d99..1bda06e1 100644 --- a/python/Dawn/views.py +++ b/python/Dawn/views.py @@ -365,8 +365,16 @@ def trade_manage(tradeid, kind): trade.cashaccount = trade.fcm_account.cash_account session.commit() if form.upload_globeop.data: + if kind == "bond": + buf = simple_serialize(trade, upload=True) + else: + buf = simple_serialize(trade) q = get_queue() - q.rpush(f'{kind}_trades', simple_serialize(trade)) + q.rpush(f"{kind}_trades", buf) + else: + if kind == "bond": + q = get_queue() + q.rpush(f"{kind}_trades", simple_serialize(trade)) return redirect(url_for('list_trades', kind=kind)) else: if form.errors: |
