Merge pull request #153 from sagidayan/API_Dev

fix
This commit is contained in:
Sagi Dayan 2015-08-02 22:49:29 +03:00
commit 679c964485

View file

@ -857,8 +857,10 @@ def getUsersStateByTask(token, taskId):
arr = [] arr = []
if task.isPersonal: if task.isPersonal:
for u in enumerate(course.membersId): for u in course.membersId:
user = User.get_by_id(int(u)) user = User.get_by_id(int(u))
if user.key().id() == course.key().id():
continue
userDic = dict(json.loads(user.to_JSON())) userDic = dict(json.loads(user.to_JSON()))
grade = TaskGrade.all().filter("taskId = ", task.key().id()).filter("userId = ", user.key().id()) grade = TaskGrade.all().filter("taskId = ", task.key().id()).filter("userId = ", user.key().id())
for g in grade.run(): for g in grade.run():