'Retrieve an object or return None if the object can\'t be found.
NOTE: This replaces functionality that was removed in Django Rest Framework v3.1.'

def get_object_or_none(self):

    try:
        return self.get_object()
    except Http404:
        if (self.request.method == 'PUT'):
            self.check_permissions(clone_request(self.request, 'POST'))
        else:
            raise
