From 4673f40dd203f0ed7f752ce582335a4fca936ae3 Mon Sep 17 00:00:00 2001 From: jakedt Date: Mon, 17 Mar 2014 15:26:16 -0400 Subject: [PATCH] Fix the org robot create response. --- endpoints/api/robot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/endpoints/api/robot.py b/endpoints/api/robot.py index 67737a9f2..c577a6685 100644 --- a/endpoints/api/robot.py +++ b/endpoints/api/robot.py @@ -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)