aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/populate_tranche_cashflows.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/populate_tranche_cashflows.py b/python/populate_tranche_cashflows.py
index e9111473..a76aabaf 100644
--- a/python/populate_tranche_cashflows.py
+++ b/python/populate_tranche_cashflows.py
@@ -49,7 +49,7 @@ def insert_tranche_cashflows(
with dawndb.cursor() as c:
for tranche_id, principal, accrued in data:
c.execute(
- "INSERT INTO tranche_cashflows VALUES(%s, %s, %s, %s, %s) ON CONFLICT (tranche_cashflows_pkey) DO NOTHING",
+ "INSERT INTO tranche_cashflows VALUES(%s, %s, %s, %s, %s) ON CONFLICT ON CONSTRAINT tranche_cashflows_pkey DO NOTHING",
(auction_date + bus_day, tranche_id, principal, accrued, "USD"),
)
dawndb.commit()
@@ -60,7 +60,7 @@ def insert_tranche_accrued(d: datetime.date, dawndb, fund="SERCGMAST"):
with dawndb.cursor() as c:
for t in portf:
c.execute(
- "INSERT INTO tranche_cashflows(date, tranche_id, accrued, currency) "
+ "INSERT INTO tranche_cashflows(date, tranche_id, accrued, currency) ON CONFLICT ON CONSTRAINT tranche_cashflows_pkey DO NOTHING"
"VALUES(%s, %s, %s, %s)",
(
t.cs["payment_dates"][0],