diff web/log.py @ 184:cbe14244a372

a few fixes
author Matt Johnston <matt@ucc.asn.au>
date Thu, 06 Feb 2014 20:35:43 +0800
parents 177f616893e6
children adbf70d1449f
line wrap: on
line diff
--- a/web/log.py	Tue Feb 04 23:39:06 2014 +0800
+++ b/web/log.py	Thu Feb 06 20:35:43 2014 +0800
@@ -269,17 +269,17 @@
     for k, v in _FIELD_DEFAULTS.iteritems():
         n = {'name': k, 'value': v}
         if type(v) is bool:
-            if v:
-                n['value'] = "true"
             kind = 'yesno'
         else:
             kind = 'number'
-            n['amount'] = 0.1;
             if k == 'overshoot_delay':
                 n['unit'] = ' sec'
                 n['amount'] = 60
+                n['digits'] = 0;
             else:
                 n['unit'] = 'ยบ'
+                n['amount'] = 0.1;
+                n['digits'] = 1;
         n['kind'] = kind
         n['title'] = k
         r.append(n)