aboutsummaryrefslogtreecommitdiffstats
path: root/python/load_intex_collateral.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/load_intex_collateral.py')
-rw-r--r--python/load_intex_collateral.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/load_intex_collateral.py b/python/load_intex_collateral.py
index 4c61b8a0..3386b50f 100644
--- a/python/load_intex_collateral.py
+++ b/python/load_intex_collateral.py
@@ -48,6 +48,8 @@ def upload_data(dealnames, workdate, conn, cursor):
for line in dr:
for f in missingfields:
line[f] = None
+ if 'Gross Margin' not in line:
+ line['Gross Margin'] = None
if line['Fixed or Float']:
line['Fixed or Float'] = line['Fixed or Float'].upper()
if line['LoanX ID']:
@@ -78,7 +80,11 @@ def upload_data(dealnames, workdate, conn, cursor):
line['Life Floor'] = float(line['Life Floor']) - float(line['Spread'])
except ValueError:
line['Life Floor'] = float('Nan')
+ if line['CUSIP']== 'XAQ3930AAB43':
+ line['CUSIP']='BL078321'
r = [convertToNone(line[field]) for field in fields]
+ if r[fields.index('CUSIP')] and len(r[fields.index('CUSIP')])>9:
+ pdb.set_trace()
data.append(r)
cursor.execute( "select distinct(updatedate) from et_collateral where dealname='{0}'".format(dealname))