add deletion protection to hosts

This commit is contained in:
AlanCoding
2018-03-29 12:25:39 -04:00
parent 6a835b8a6b
commit dd8acb70be
2 changed files with 8 additions and 2 deletions

View File

@@ -2169,7 +2169,7 @@ class HostList(HostRelatedSearchMixin, ListCreateAPIView):
return Response(dict(error=_(six.text_type(e))), status=status.HTTP_400_BAD_REQUEST)
class HostDetail(ControlledByScmMixin, RetrieveUpdateDestroyAPIView):
class HostDetail(RelatedJobsPreventDeleteMixin, ControlledByScmMixin, RetrieveUpdateDestroyAPIView):
always_allow_superuser = False
model = Host