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:
Seth Foster
2023-08-08 22:56:36 -04:00
committed by Seth Foster
parent 70ba32b5b2
commit c47acc5988
5 changed files with 26 additions and 53 deletions

View File

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