aboutsummaryrefslogtreecommitdiffstats
path: root/python/load_indicative.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/load_indicative.py')
-rw-r--r--python/load_indicative.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/load_indicative.py b/python/load_indicative.py
index 5114392b..793222fa 100644
--- a/python/load_indicative.py
+++ b/python/load_indicative.py
@@ -111,7 +111,7 @@ def upload_deal_data(conn, filename):
line["Paid Down"] = re.sub("Paid Down: ","", line["Latest Update"])
line["Latest Update"] = line["Paid Down"]
for field in ["Deal Issue Date", "Deal Termination Date", "Reinv End Date", \
- "Latest Update", "Pay Day", "Deal First Pay Date"]:
+ "Latest Update", "Pay Day", "Deal First Pay Date", "Paid Down"]:
if line[field]:
try:
line[field] = datetime.datetime.strptime(line[field], '%b %d, %Y').date()
@@ -144,6 +144,10 @@ def upload_deal_data(conn, filename):
except (psycopg2.DataError, KeyError) as detail:
logging.error(detail)
pdb.set_trace()
+ with conn.cursor() as c:
+ if line['Paid Down']:
+ c.execute("UPDATE deal_indicative SET paid_down=%s WHERE dealname=%s",
+ (line['Paid Down'], dealname))
if dealname not in deallist1 or line['Latest Update'] not in deallist1[dealname]:
sqlstring = \
"INSERT INTO clo_universe " \