aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/report_ops/custodians.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py
index 82892a40..4ec44716 100644
--- a/python/report_ops/custodians.py
+++ b/python/report_ops/custodians.py
@@ -47,13 +47,17 @@ def upload_to_custodian(account, trade_date, conn, upload, em):
(row.id,),
)
if old_trade := d.fetchone():
- if (row.identifier, row.principal_payment, row.accrued_payment) != (
+ if (
+ row.identifier,
+ f"{row.principal_payment:.2f}",
+ f"{row.accrued_payment:.2f}",
+ ) != (
old_trade.identifier,
- old_trade.principal_payment,
- old_trade.accrued_payment,
+ f"{old_trade.principal_payment:.2f}",
+ f"{old_trade.accrued_payment:.2f}",
):
d.execute(
- "UPDATE bond_csv_upload SET identifier=%s AND principal_payment=%s AND accrued_payment=%s WHERE allocationid=%s",
+ "UPDATE bond_csv_upload SET identifier=%s, principal_payment=%s, accrued_payment=%s WHERE allocationid=%s",
(
row.identifier,
row.principal_payment,