[chronojump-server] uploadEncoderData uses exerciseID instead of exerciseName



commit 44c25007fc6421b8007b4545d075329920212f05
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jun 26 23:01:22 2017 +0200

    uploadEncoderData uses exerciseID instead of exerciseName

 main.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/main.py b/main.py
index 7900676..fe78687 100755
--- a/main.py
+++ b/main.py
@@ -175,7 +175,7 @@ def uploadEncoderData():
 
     personId  = content.get('personId', 1)
     stationId  = content.get('stationId', 1)
-    exerciseName  = content.get('exerciseName', "unknown")
+    exerciseId  = content.get('exerciseID', 1)
     resistance  = content.get('resistance', 0)
 
     repetitions = content.get('repetitions', 1)
@@ -204,11 +204,11 @@ def uploadEncoderData():
     (con, cur) = connect_db()
 
     cur.execute("INSERT INTO resultEncoder " +
-            "(personId, stationId, exerciseName, resistance, repetitions, " +
+            "(personId, stationId, exerciseId, resistance, repetitions, " +
             "lossBySpeed, numBySpeed, rangeBySpeed, vmeanBySpeed, vmaxBySpeed, pmeanBySpeed, pmaxBySpeed, " +
             "lossByPower, numByPower, rangeByPower, vmeanByPower, vmaxByPower, pmeanByPower, pmaxByPower) " +
             "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
-            (personId, stationId, exerciseName, resistance, repetitions,
+            (personId, stationId, exerciseId, resistance, repetitions,
                 lossBySpeed, numBySpeed, rangeBySpeed, vmeanBySpeed, vmaxBySpeed, pmeanBySpeed, pmaxBySpeed,
                 lossByPower, numByPower, rangeByPower, vmeanByPower, vmaxByPower, pmeanByPower, pmaxByPower,
                 ))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]