'Update a saved search
Update a saved search.
{method} {path}
"name: "Unresolved",
"query": "is:unresolved",
"dateSavedSearchd": "2015-05-11T02:23:10Z"'

def put(self, request, project, search_id):

    try:
        search = SavedSearch.objects.get(project=project, id=search_id)
    except SavedSearch.DoesNotExist:
        raise ResourceDoesNotExist
    if request.access.has_team_scope(project.team, 'project:write'):
        serializer = SavedSearchSerializer(data=request.DATA, partial=True)
    else:
        serializer = LimitedSavedSearchSerializer(data=request.DATA, partial=True)
    if (not serializer.is_valid()):
        return Response(serializer.errors, status=400)
    result = serializer.object
    kwargs = {}
    if result.get('name'):
        kwargs['name'] = result['name']
    if result.get('query'):
        kwargs['query'] = result['query']
    if result.get('isDefault'):
        kwargs['is_default'] = result['isDefault']
    if kwargs:
        search.update(**kwargs)
    if result.get('isDefault'):
        SavedSearch.objects.filter(project=project).exclude(id=search_id).update(is_default=False)
    if result.get('isUserDefault'):
        SavedSearchUserDefault.objects.create_or_update(user=request.user, project=project, values={'savedsearch': search})
    return Response(serialize(search, request.user))
