aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/report_ops/__main__.py6
-rw-r--r--python/report_ops/wires.py3
2 files changed, 5 insertions, 4 deletions
diff --git a/python/report_ops/__main__.py b/python/report_ops/__main__.py
index 0f8f2440..a2f501e6 100644
--- a/python/report_ops/__main__.py
+++ b/python/report_ops/__main__.py
@@ -17,7 +17,7 @@ from .sma import (
)
from .cash import NTCashReport, UMBCashReport, BNYCashReport
from .admin import AccruedReport, AllReport
-from .wires import BowdstWire, NTWire
+from .wires import Wire
from .custodians import upload_to_custodian
from .utils import notify_payment_settlements, PaymentMonitor
@@ -103,9 +103,9 @@ if args.isosel_reports:
logger.info(e)
if args.wire_reports:
- for wire_report in (BowdstWire, NTWire):
+ for fund in ("BOWDST", "ISOSEL"):
try:
- wire_report.to_db(args.date)
+ Wire[fund].to_db(args.date)
except ValueError as e:
logger.info(e)
diff --git a/python/report_ops/wires.py b/python/report_ops/wires.py
index c3eb1cf7..50f8284d 100644
--- a/python/report_ops/wires.py
+++ b/python/report_ops/wires.py
@@ -30,6 +30,7 @@ class Wire(Deal, table_name="custodian_wires", deal_type="custodian_wires"):
+ "ON CONFLICT (unique_ref) DO NOTHING RETURNING *"
)
cls.fund = fund
+ cls._registry[fund] = cls
cls.dtkey = dtkey
def __post_init__(self):
@@ -78,7 +79,7 @@ class BowdstWire(Wire, BNY, fund="BOWDST", dtkey="%Y%m%d%H%M%S"):
cls.commit()
-class NTWire(Wire, NT, fund="ISOSEL", dtkey="%Y%m%d%H%M"):
+class SeleneWire(Wire, NT, fund="ISOSEL", dtkey="%Y%m%d%H%M"):
@classmethod
def from_report_line(cls, line: dict):
return cls(