diff options
Diffstat (limited to 'python/report_ops/wires.py')
| -rw-r--r-- | python/report_ops/wires.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/report_ops/wires.py b/python/report_ops/wires.py index 0e367290..7e210ed7 100644 --- a/python/report_ops/wires.py +++ b/python/report_ops/wires.py @@ -3,9 +3,10 @@ import datetime from serenitas.ops.trade_dataclasses import Deal, Ccy from typing import ClassVar from .custodians import NT, BNY -from .misc import get_dir +from .misc import get_dir, dt_from_fname from dataclasses import field from csv import DictReader +from functools import partial _nt_to_currency = {"EURO - EUR": "EUR", "U.S. DOLLARS - USD": "USD"} @@ -43,7 +44,7 @@ class Wire(Deal, table_name="custodian_wires", deal_type="custodian_wires"): cls.download_reports(date) p = max( [f for f in get_dir(date).iterdir() if fname in f.name], - key=cls.dtkey_fun(), + key=partial(dt_from_fname, dt_format=cls.dtkey), default=None, ) if not p: |
