aboutsummaryrefslogtreecommitdiffstats
path: root/python/task_server/globeop.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/task_server/globeop.py')
-rw-r--r--python/task_server/globeop.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/python/task_server/globeop.py b/python/task_server/globeop.py
index c764f2d1..0b9747cd 100644
--- a/python/task_server/globeop.py
+++ b/python/task_server/globeop.py
@@ -164,11 +164,12 @@ def insert_todb(engine, workdate: datetime.date, fund="SERCGMAST"):
if not report_file.exists():
continue
df = fun(report_file)
- if report in (
- "Valuation",
- "Pnl",
- ) and workdate >= datetime.date(2022, 11, 25):
- df.custacctname = df.custacctname.str.replace("V0NSCLMAMB", "159260.1")
+ if workdate >= datetime.date(2022, 11, 25):
+ match report:
+ case "Valuation" | "Pnl":
+ df.loc[~df.invid.isin(["USD", "EUR"]), "custacctname"] = df.loc[
+ ~df.invid.isin(["USD", "EUR"])
+ ].custacctname.str.replace("V0NSCLMAMB", "159260.1")
if report == "Valuation":
period_end_date = pd.Timestamp(df.periodenddate[0])
sql_str = (