diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/collateral/common.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/python/collateral/common.py b/python/collateral/common.py index c220cac6..fda49192 100644 --- a/python/collateral/common.py +++ b/python/collateral/common.py @@ -72,9 +72,11 @@ def compare_notionals_rates( logger.error(f"Database and {fcm} FCM know different notionals") for t in diff_notionals.itertuples(): - logger.error( - f"{t.Index[0]}\t{t.Index[1]:%Y-%m-%d}\t{t.notional}\t{t.NOTIONAL}" - ) + if hasattr(t, "effective_date"): + msg = f"{t.Index[0]}\t{t.effective_date:%Y-%m-%d}\t{t.notional}\t{t.NOTIONAL}" + else: + msg = f"{t.Index[0]}\t{t.Index[1]:%Y-%m-%d}\t{t.notional}\t{t.NOTIONAL}" + logger.error(msg) def get_bilateral_trades(d: datetime.date, fund: str, engine: Engine) -> pd.DataFrame: |
