aboutsummaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/citco_ops/bowdst.py4
-rw-r--r--python/custodian_wire.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/python/citco_ops/bowdst.py b/python/citco_ops/bowdst.py
index 0c4a6506..081059b4 100644
--- a/python/citco_ops/bowdst.py
+++ b/python/citco_ops/bowdst.py
@@ -19,7 +19,9 @@ class Wire(Deal, table_name="custodian_wires", deal_type="custodian_wires"):
unique_ref: str
def __init_subclass__(cls, fund, **kwargs):
- cls._sql_insert += " ON CONFLICT (unique_ref) DO NOTHING"
+ cls._sql_insert.replace(
+ "RETURNING *", "ON CONFLICT (unique_ref) DO NOTHING RETURNING *"
+ )
cls.fund = fund
def __post_init__(self):
diff --git a/python/custodian_wire.py b/python/custodian_wire.py
index 13970c8d..8c93d9c5 100644
--- a/python/custodian_wire.py
+++ b/python/custodian_wire.py
@@ -23,7 +23,7 @@ def load_bowdst_wire_report(workdate: datetime.date):
reader = DictReader(fh)
for line in reader:
BowdstWire.from_nexen_line(line).stage()
- BowdstWire.commit()
+ next(BowdstWire.commit())
def load_isosel_wire_report(workdate: datetime.date):
@@ -39,7 +39,7 @@ def load_isosel_wire_report(workdate: datetime.date):
for line in reader:
if "sponsor" in line["narrative"].lower():
IsoselWire.from_passport_line(line).stage()
- IsoselWire.commit()
+ next(IsoselWire.commit())
if __name__ == "__main__":