mirror of
https://github.com/quay/quay.git
synced 2025-12-07 09:02:18 +03:00
api: accepting empty body for create robot endpoints (PROJQUAY-6224) (#2420)
accepting empty body for create robot endpoints
This commit is contained in:
@@ -120,7 +120,7 @@ class UserRobot(ApiResource):
|
||||
Create a new user robot with the specified name.
|
||||
"""
|
||||
parent = get_authenticated_user()
|
||||
create_data = request.get_json() or {}
|
||||
create_data = request.get_json(silent=True) or {}
|
||||
robot = model.create_user_robot(
|
||||
robot_shortname,
|
||||
parent,
|
||||
@@ -236,7 +236,7 @@ class OrgRobot(ApiResource):
|
||||
"""
|
||||
permission = AdministerOrganizationPermission(orgname)
|
||||
if permission.can() or allow_if_superuser():
|
||||
create_data = request.get_json() or {}
|
||||
create_data = request.get_json(silent=True) or {}
|
||||
robot = model.create_org_robot(
|
||||
robot_shortname,
|
||||
orgname,
|
||||
|
||||
Reference in New Issue
Block a user