Merge pull request #157 from sagidayan/API_Dev

fix in submitGrade
This commit is contained in:
Sagi Dayan 2015-08-03 00:24:43 +03:00
commit 46f598d98d

View file

@ -303,8 +303,8 @@ def submitGrade(token, taskId, ownerId, grade):
try:
tg = TaskGrade.all().filter("taskId = ", int(taskId)).filter("userId = ", int(ownerId))
if tg.count() == 0:
grade = TaskGrade(taskId=int(taskId), userId=int(ownerId), grade=int(grade))
db.put(grade)
grade = TaskGrade(taskId=int(taskId), userId=int(ownerId), grade=int(grade))
db.put(grade)
else:
for g in tg.run():