1
0
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:
Brandon Caton
2023-10-19 03:39:32 -04:00
committed by GitHub
parent 81bf634749
commit e5a5e17814
3 changed files with 6 additions and 5 deletions

View File

@@ -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,