[chronojump-server] main.py upload correctly sprint times on 4 columns



commit 220da0ebcbde339249a4c62325ee204749e03b90
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Sep 18 11:44:14 2017 +0200

    main.py upload correctly sprint times on 4 columns

 main.py |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/main.py b/main.py
index 5c8d2a9..b206fad 100755
--- a/main.py
+++ b/main.py
@@ -241,7 +241,11 @@ def uploadSprintData():
 
     personId  = content.get('personId', 1)
     distances  = content.get('distances', "")
-    times  = content.get('times', "")
+    #times  = content.get('times', "")
+    t1  = content.get('t1', "")
+    t2  = content.get('t2', "")
+    t3  = content.get('t3', "")
+    t4  = content.get('t4', "")
     k  = content.get('k', "")
     vmax  = content.get('vmax', "")
     amax  = content.get('amax', "")
@@ -256,9 +260,9 @@ def uploadSprintData():
     (con, cur) = connect_db()
 
     cur.execute("INSERT INTO resultSprint " +
-            "(dt, personId, distances, times, k, vmax, amax, fmax, pmax) " +
-            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
-            (datetime.datetime.now(), personId, distances, times, k, vmax, amax, fmax, pmax))
+            "(dt, personId, distances, t1, t2, t3, t4, k, vmax, amax, fmax, pmax) " +
+            "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
+            (datetime.datetime.now(), personId, distances, t1, t2, t3, t4, k, vmax, amax, fmax, pmax))
     con.commit()
 
     return Response("", 202)


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