mirror of
https://github.com/ansible/awx.git
synced 2026-04-06 02:29:21 -02:30
Change PeersSerializer to SlugRelatedField
Get rid of PeersSerializer and just use SlugRelatedField, which should be more a straightforward approach. Other changes: - cleanup code related to the already-removed api/v2/peers endpoint - add "hybrid" node type into more instance_peers test cases
This commit is contained in:
@@ -4349,17 +4349,3 @@ class WorkflowApprovalDeny(RetrieveAPIView):
|
||||
return Response({"error": _("This workflow step has already been approved or denied.")}, status=status.HTTP_400_BAD_REQUEST)
|
||||
obj.deny(request)
|
||||
return Response(status=status.HTTP_204_NO_CONTENT)
|
||||
|
||||
|
||||
class PeersList(ListAPIView):
|
||||
name = _("Peers")
|
||||
model = models.InstanceLink
|
||||
serializer_class = serializers.InstanceLinkSerializer
|
||||
search_fields = ('source', 'target', 'link_state')
|
||||
|
||||
|
||||
class PeersDetail(RetrieveAPIView):
|
||||
name = _("Peers Detail")
|
||||
always_allow_superuser = True
|
||||
model = models.InstanceLink
|
||||
serializer_class = serializers.InstanceLinkSerializer
|
||||
|
||||
Reference in New Issue
Block a user