[chronojump] Networks django Fix for upload sprint vmax, amax, fmax, pmax



commit 4df1e9e61e23e76aa682ce28011d3f7da51af098
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jun 21 13:06:24 2019 +0200

    Networks django Fix for upload sprint vmax, amax, fmax, pmax

 src/json/compujump.cs | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/src/json/compujump.cs b/src/json/compujump.cs
index 51601041..3043c51d 100644
--- a/src/json/compujump.cs
+++ b/src/json/compujump.cs
@@ -545,10 +545,20 @@ public class JsonCompujump : Json
                        json.Add("t4", "");
 
                json.Add("k", o.k);
-               json.Add("vmax", o.vmax);
-               json.Add("amax", o.amax);
-               json.Add("fmax", o.fmax);
-               json.Add("pmax", o.pmax);
+
+               //at django upload this as strings with '.' as decimal separator
+               if(django)
+               {
+                       json.Add("vmax", Util.ConvertToPoint(o.vmax));
+                       json.Add("amax", Util.ConvertToPoint(o.amax));
+                       json.Add("fmax", Util.ConvertToPoint(o.fmax));
+                       json.Add("pmax", Util.ConvertToPoint(o.pmax));
+               } else {
+                       json.Add("vmax", o.vmax);
+                       json.Add("amax", o.amax);
+                       json.Add("fmax", o.fmax);
+                       json.Add("pmax", o.pmax);
+               }
 
                // Converts it to a String
                String js = json.ToString();


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