diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/position.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/position.py b/python/position.py index 50f23df1..dd862ade 100644 --- a/python/position.py +++ b/python/position.py @@ -301,6 +301,9 @@ def update_cash_rates(conn, session, start_date: datetime.date = None): c.execute(sql_str, (v["LAST_UPDATE_DT"], securities[k], v["PX_LAST"])) else: for k, v in data.items(): + if "PX_LAST" not in v: + logging.error(f"no data for {k}") + continue for d, r in v["PX_LAST"].items(): c.execute(sql_str, (d, securities[k], r)) conn.commit() |
