aboutsummaryrefslogtreecommitdiffstats
path: root/python/handle_default.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/handle_default.py')
-rw-r--r--python/handle_default.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/handle_default.py b/python/handle_default.py
index a47854c3..0ef2dd31 100644
--- a/python/handle_default.py
+++ b/python/handle_default.py
@@ -35,7 +35,7 @@ def create_newindices(recordslist, recovery, lastdate, conn):
for r in recordslist:
r['indexfactor'] -= r['orig_weight']
r['version'] += 1
- r['cumulativeloss'] += (100-recovery) * r['orig_weight']
+ r['cumulativeloss'] += (100-recovery) * r['orig_weight'] /100
r['lastdate'] = 'infinity'
c.execute(insertstr, r)
newids[r['basketid']] = c.fetchone()[0]
@@ -50,7 +50,7 @@ def update_indexmembers(newids, company_id, seniority, conn):
c.execute("INSERT INTO basket_constituents "
"(SELECT company_id, seniority, %s, weight "
"FROM basket_constituents "
- "WHERE basket_id=%s AND NOT (company_id=%s AND seniority=%s))",
+ "WHERE basketid=%s AND NOT (company_id=%s AND seniority=%s))",
(newid, oldid, company_id, seniority))
conn.commit()