This commit is contained in:
Aran Zaiger 2015-08-02 18:41:19 +03:00
parent 1615963c15
commit 9e5d6f9139

View file

@ -704,9 +704,9 @@ def getTaskById(token, taskId, ownerId):
task['grade'] = {} task['grade'] = {}
taskCompQuery = TaskComponent.all() taskCompQuery = TaskComponent.all()
taskCompQuery.filter("taskId = ", taskId) taskCompQuery.filter("taskId = ", int(taskId))
taskCompQuery.filter("userId = ", ownerId) taskCompQuery.filter("userId = ", int(ownerId))
# if task.isPersonal: # if task.isPersonal:
# taskCompQuery.filter("userId = ", user.key().id()) # taskCompQuery.filter("userId = ", user.key().id())
# else: # else:
@ -714,7 +714,6 @@ def getTaskById(token, taskId, ownerId):
#check if never created a personalized task and if so, create it #check if never created a personalized task and if so, create it
if taskCompQuery.count() == 0: if taskCompQuery.count() == 0:
print "here"
taskCompQuery = TaskComponent.all().filter("taskId =", int(taskId)).filter("userId =", -1) taskCompQuery = TaskComponent.all().filter("taskId =", int(taskId)).filter("userId =", -1)
print "query count is: ", taskCompQuery.count() print "query count is: ", taskCompQuery.count()
for tc in taskCompQuery.run(): for tc in taskCompQuery.run():