added value to componenets and submitTask method

This commit is contained in:
Aran Zaiger 2015-08-02 16:43:56 +03:00
parent e558b9e238
commit 71939c1b1c

View file

@ -209,10 +209,10 @@ def submitTask(token, taskId, ownerId):
bad_request("bad Task id")
if task.isPersonal:
if User.get_by_id(ownerId) is None:
if User.get_by_id(int(ownerId)) is None:
return bad_request("no such user")
else:
if Project.get_by_id(ownerId) is None:
if Project.get_by_id(int(ownerId)) is None:
return bad_request("no such project")
@ -692,10 +692,10 @@ def getTaskById(token, taskId, ownerId):
if task is None:
return bad_request("Bad Task id")
if task.isPersonal:
if User.get_by_id(ownerId) is None:
if User.get_by_id(int(ownerId)) is None:
return bad_request("no such user")
else:
if Project.get_by_id(ownerId) is None:
if Project.get_by_id(int(ownerId)) is None:
return bad_request("no such project")
task = json.loads(task.to_JSON())