def METHOD_NAME(self, request, *args, **kwargs):
    obj = self.get_object()
    kind = self.request.data.get('kind') or kwargs.get('kind')
    # Do not allow changes to an Inventory kind.
    if kind is not None and obj.kind != kind:
        return Response(
            dict(error=_('You cannot turn a regular inventory into a "smart" or "constructed" inventory.')), status=status.HTTP_405_METHOD_NOT_ALLOWED
        )
    return super(InventoryDetail, self).METHOD_NAME(request, *args, **kwargs)