1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

show just id field for API browser POST box

This commit is contained in:
AlanCoding 2017-07-25 13:35:53 -04:00
parent ac11dcac05
commit aa14d12f42

View File

@ -627,6 +627,13 @@ class SubListAttachDetachAPIView(SubListCreateAttachDetachAPIView):
status=status.HTTP_400_BAD_REQUEST) status=status.HTTP_400_BAD_REQUEST)
return super(SubListAttachDetachAPIView, self).post(request, *args, **kwargs) return super(SubListAttachDetachAPIView, self).post(request, *args, **kwargs)
def update_raw_data(self, data):
request_method = getattr(self, '_raw_data_request_method', None)
response_status = getattr(self, '_raw_data_response_status', 0)
if request_method == 'POST' and response_status in xrange(400, 500):
return super(SubListAttachDetachAPIView, self).update_raw_data(data)
return {'id': None}
class DeleteLastUnattachLabelMixin(object): class DeleteLastUnattachLabelMixin(object):
''' '''