Merge branch 'master' of github.com:sagidayan/SE-Hub
This commit is contained in:
commit
cf0114c5ac
1 changed files with 4 additions and 4 deletions
|
@ -209,10 +209,10 @@ def submitTask(token, taskId, ownerId):
|
||||||
bad_request("bad Task id")
|
bad_request("bad Task id")
|
||||||
|
|
||||||
if task.isPersonal:
|
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")
|
return bad_request("no such user")
|
||||||
else:
|
else:
|
||||||
if Project.get_by_id(ownerId) is None:
|
if Project.get_by_id(int(ownerId)) is None:
|
||||||
return bad_request("no such project")
|
return bad_request("no such project")
|
||||||
|
|
||||||
|
|
||||||
|
@ -692,10 +692,10 @@ def getTaskById(token, taskId, ownerId):
|
||||||
if task is None:
|
if task is None:
|
||||||
return bad_request("Bad Task id")
|
return bad_request("Bad Task id")
|
||||||
if task.isPersonal:
|
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")
|
return bad_request("no such user")
|
||||||
else:
|
else:
|
||||||
if Project.get_by_id(ownerId) is None:
|
if Project.get_by_id(int(ownerId)) is None:
|
||||||
return bad_request("no such project")
|
return bad_request("no such project")
|
||||||
|
|
||||||
task = json.loads(task.to_JSON())
|
task = json.loads(task.to_JSON())
|
||||||
|
|
Loading…
Reference in a new issue