aboutsummaryrefslogtreecommitdiffstats
path: root/python/report_ops/custodians.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/report_ops/custodians.py')
-rw-r--r--python/report_ops/custodians.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/python/report_ops/custodians.py b/python/report_ops/custodians.py
index a819e332..17d79dfb 100644
--- a/python/report_ops/custodians.py
+++ b/python/report_ops/custodians.py
@@ -12,11 +12,9 @@ from dataclasses import dataclass
_sql = (
"INSERT INTO bond_csv_upload (allocationid, identifier, principal, interest) SELECT id, identifier, principal_payment, "
- "accrued_payment FROM bond_trades WHERE trade_date=%s AND account=%s AND tradeid IS NOT NULL ON CONFLICT DO NOTHING RETURNING allocationid;"
+ "accrued_payment FROM bond_trades WHERE trade_date=%s AND account=%s AND tradeid IS NOT NULL ON CONFLICT DO NOTHING RETURNING *"
)
-_bond_query = "SELECT * FROM bond_trades WHERE id in %s;"
-
def upload_to_custodian(account, trade_date, conn, upload):
_fund = {"BBH": "BRINKER", "UMB": "UMB"}
@@ -29,10 +27,6 @@ def upload_to_custodian(account, trade_date, conn, upload):
account,
),
)
- tids = tuple(row.allocationid for row in c)
- if not tids:
- return
- c.execute(_bond_query, (tids,))
for row in c:
trade = BondDeal.from_dict(**row._asdict(), scaled=True)
match account: