This commit is contained in:
Aran Zaiger 2015-08-02 20:05:14 +03:00
parent 9ad25bff88
commit 6f521efadb

View file

@ -817,7 +817,7 @@ def getTaskById(token, taskId, ownerId):
grade = TaskGrade.all().filter("taskId = ", int(taskId)).filter("userId = ", int(ownerId)) grade = TaskGrade.all().filter("taskId = ", int(taskId)).filter("userId = ", int(ownerId))
gradeFound = False gradeFound = False
for g in grade.run(): for g in grade.run():
task['grade'] = g task['grade'] = json.loads(g.to_JSON())
gradeFound = True gradeFound = True
if not gradeFound: if not gradeFound:
task['grade'] = {'taskId': taskId, 'userId': ownerId, 'grade': None} task['grade'] = {'taskId': taskId, 'userId': ownerId, 'grade': None}