mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -03:30
Merge pull request #2951 from AlanCoding/role_user_wording
/roles/N/users/ error message correction
This commit is contained in:
commit
562b202fca
@ -3651,10 +3651,10 @@ class RoleUsersList(SubListCreateAttachDetachAPIView):
|
||||
return role.members.all()
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
# Forbid implicit role creation here
|
||||
# Forbid implicit user creation here
|
||||
sub_id = request.data.get('id', None)
|
||||
if not sub_id:
|
||||
data = dict(msg="Role 'id' field is missing.")
|
||||
data = dict(msg="User 'id' field is missing.")
|
||||
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
||||
return super(RoleUsersList, self).post(request, *args, **kwargs)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user