diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/reallocate_cash.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/reallocate_cash.py b/python/reallocate_cash.py index 1a9d277f..90b4a06e 100644 --- a/python/reallocate_cash.py +++ b/python/reallocate_cash.py @@ -123,6 +123,7 @@ def insert_iam_sql(conn, trade_date): totals[_brokers[row.broker]] += row.amount for broker, amount in totals.items(): if broker == "GOLDNY": + # We don't need to offset Goldman FCM because BONY doesn't book them continue data.append( (trade_date, "NEW", "CSH_CASH", broker, None, -amount, "USD", True) @@ -134,7 +135,7 @@ def insert_iam_sql(conn, trade_date): ) try: c.executemany(insert_query, data) - except Exception as e: + except UniqueViolation: # We already uploaded the IAM tickets today in that case, we need to update and cancel the old uploads conn.rollback() c.execute( |
