Fix the org robot create response.

This commit is contained in:
jakedt 2014-03-17 15:26:16 -04:00
parent bb2767ff16
commit 4673f40dd2

View file

@ -75,10 +75,8 @@ class OrgRobot(ApiResource):
if permission.can():
parent = model.get_organization(orgname)
robot, password = model.create_robot(robot_shortname, parent)
resp = robot_view(robot.username, password)
log_action('create_robot', orgname, {'robot': robot_shortname})
resp.status_code = 201
return resp
return robot_view(robot.username, password), 201
abort(403)