From e17e3a2bdbe0dcdbe09650b3b7b4f3796df54233 Mon Sep 17 00:00:00 2001 From: Alexandre Dulaunoy Date: Fri, 10 Jan 2014 10:17:45 +0100 Subject: [PATCH] Return Numbers in JSON --- bin/qof-server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/qof-server.py b/bin/qof-server.py index 627fda1..faac453 100644 --- a/bin/qof-server.py +++ b/bin/qof-server.py @@ -33,7 +33,7 @@ def getFirstSeen(t1 = None, t2 = None): rec = "s:"+t1.lower()+":"+t2.lower() recget = r.get(rec) if recget is not None: - return recget.decode(encoding='UTF-8') + return int(recget.decode(encoding='UTF-8')) def getLastSeen(t1 = None, t2 = None): if t1 is None or t2 is None: @@ -41,7 +41,7 @@ def getLastSeen(t1 = None, t2 = None): rec = "l:"+t1.lower()+":"+t2.lower() recget = r.get(rec) if recget is not None: - return recget.decode(encoding='UTF-8') + return int(recget.decode(encoding='UTF-8')) def getCount(t1 = None, t2 = None): if t1 is None or t2 is None: @@ -49,7 +49,7 @@ def getCount(t1 = None, t2 = None): rec = "o:"+t1.lower()+":"+t2.lower() recget = r.get(rec) if recget is not None: - return recget.decode(encoding='UTF-8') + return int(recget.decode(encoding='UTF-8')) def getRecord(t = None): if t is None: