From 993e622f53c696ff83b4fd53496bf5fdf30082b4 Mon Sep 17 00:00:00 2001 From: aranzaiger Date: Sun, 2 Aug 2015 21:54:39 +0300 Subject: [PATCH] fix --- SE_API/TaskRoutes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SE_API/TaskRoutes.py b/SE_API/TaskRoutes.py index 026126d..764b063 100644 --- a/SE_API/TaskRoutes.py +++ b/SE_API/TaskRoutes.py @@ -712,7 +712,7 @@ def getAllUserTasks(token): grade = TaskGrade.all().filter("taskId = ", t.key().id()).filter("userId = ", ownerId) for g in grade.run(): - taskDic['grade'] = g.grade + taskDic['grade'] = json.loads(g.to_JSON()) if grade.count() == 0: taskDic['grade'] = {'taskId': t.key().id(), 'userId': ownerId, 'grade': None} @@ -724,6 +724,7 @@ def getAllUserTasks(token): taskDic['submitted']['total'] = total basicTC = TaskComponent.all().filter("taskId = ", t.key().id()).filter("userId = ", -1).count() + print "basic tc: " + basicTC allTC = TaskComponent.all().filter("taskId = ", t.key().id()).count() done = (basicTC/allTC) - 1 taskDic['submitted']['done'] = done