From b8fcdaa9b852cce63badb2665151615e1865a02d Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 13 Apr 2017 19:41:31 +0200 Subject: rename score to impact_score and make it INT --- worker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/worker.py b/worker.py index 2051516..4520d6f 100644 --- a/worker.py +++ b/worker.py @@ -223,15 +223,15 @@ def process(): with db.no_autoflush: for c in range(len(ratings)): - rating = float(ratings[c]) + rating = int(100 * float(ratings[c])) pstat = db.query(ParticipantStats).filter( ParticipantStats.participant_api_id == ids[c]).first() # manual upsert if pstat is None: db.add(ParticipantStats(participant_api_id=ids[c], - score=rating)) + impact_score=rating)) else: - pstat.score = rating + pstat.impact_score = rating db.commit() # ack all until this one -- cgit v1.3.1