Ver código fonte

RedisStorage: properly read int and float values

Helge Jung 9 anos atrás
pai
commit
166ef58c0f
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      ffstatus/redisstorage.py

+ 2 - 2
ffstatus/redisstorage.py

@@ -67,9 +67,9 @@ class RedisStorage(BaseStorage):
             if fieldtype == 'json':
                 node[item] = json.loads(payload)
             elif fieldtype == 'int':
-                node[item] = int()
+                node[item] = int(payload)
             elif fieldtype == 'float':
-                node[item] = float()
+                node[item] = float(payload)
             else:
                 node[item] = payload