aboutsummaryrefslogtreecommitdiffstats
path: root/python/mtm_status.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/mtm_status.py')
-rw-r--r--python/mtm_status.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/python/mtm_status.py b/python/mtm_status.py
index 76cee09d..385b8e4c 100644
--- a/python/mtm_status.py
+++ b/python/mtm_status.py
@@ -20,8 +20,10 @@ def run(conn, date):
with sftp.client.open(f"outbound/{target_file}") as sftp_handle:
with ZipFile(sftp_handle).open(target_file.removesuffix(".zip")) as zip_handle:
df = pd.read_csv(zip_handle, skiprows=2, na_filter=False)
-
- df = df[(df["SwapType"].isin(["NEW", "ASGM", "TERM"])) & (df["Executed"])]
+ df = df[
+ (df["SwapType"].isin(["NEW", "ASGM", "TERM"]))
+ & (df["ThirdPartyStatus.1"].isin(["Confirmed"]))
+ ]
place_holders = ",".join(["%s"] * 7)
sql_str = (
f"INSERT INTO mtm_submissions VALUES({place_holders}) "
@@ -35,7 +37,7 @@ def run(conn, date):
sql_str,
(
row.TICKETID,
- row.Executed,
+ row.Executed if row.Executed else None,
row.TicketNo,
row.ProductType,
row.BrokerId,