diff --git a/iaso/api/entity_types.py b/iaso/api/entity_types.py index e0b997c4fc..d64763b958 100644 --- a/iaso/api/entity_types.py +++ b/iaso/api/entity_types.py @@ -109,8 +109,7 @@ def destroy(self, request, pk=None, *args, **kwargs): if not request.user.has_perm(permission.ENTITY_TYPE_WRITE): return Response(status=status.HTTP_403_FORBIDDEN) - obj = get_object_or_404(pk=pk) - + obj = get_object_or_404(EntityType, pk=pk) obj.delete() return Response(status=status.HTTP_204_NO_CONTENT)