original_docstring: Delete saved search by ID.
  
    Endpoint deleting saved search by it's ID. Request should contain saved
    search ID. If saved search is successfully deleted, it's ID will be returned.
    If there isn't any saved search with provided ID, 404 status code and
    "No saved search with id <id> found for current user" message will be
    returned.
  
    Args:
      saved_search_id (int): ID of saved search to delete
  
    Returns:
      Flask Response object containing ID of deleted saved search or error
      message if saved search is not found.
    
docstring: Delete saved search by ID.
  Endpoint deleting saved search by it's ID. Request should contain saved
  search ID. If saved search is successfully deleted, it's ID will be returned.
  If there isn't any saved search with provided ID, 404 status code and
  "No saved search with id  found for current user" message will be
  returned.
docstring_tokens: Delete saved search by ID . Endpoint deleting saved search by it ' s ID . Request should contain saved search ID . If saved search is successfully deleted it ' s ID will be returned . If there isn ' t any saved search with provided ID 404 status code and " No saved search with id found for current user " message will be returned .
code: def delete_saved_search(saved_search_id):
    """Delete saved search by ID.
  
    Endpoint deleting saved search by it's ID. Request should contain saved
    search ID. If saved search is successfully deleted, it's ID will be returned.
    If there isn't any saved search with provided ID, 404 status code and
    "No saved search with id <id> found for current user" message will be
    returned.
  
    Args:
      saved_search_id (int): ID of saved search to delete
  
    Returns:
      Flask Response object containing ID of deleted saved search or error
      message if saved search is not found.
    """
    user = login.get_current_user(use_external_user=False)
  
    saved_search = user.saved_searches.filter(
        SavedSearch.id == saved_search_id
    ).first()
  
    if not saved_search:
      return make_error_response(
          "No saved search with id {} found for current user".format(
              saved_search_id,
          ),
          404,
          force_json=True,
      )
  
    db.session.delete(saved_search)
    db.session.commit()
  
    return json_success_response({"deleted": saved_search_id})
code_tokens: def delete_saved_search ( saved_search_id ) : user = login . get_current_user ( use_external_user = False ) saved_search = user . saved_searches . filter ( SavedSearch . id == saved_search_id ) . first ( ) if not saved_search : return make_error_response ( "No saved search with id {} found for current user" . format ( saved_search_id , ) , 404 , force_json = True , ) db . session . delete ( saved_search ) db . session . commit ( ) return json_success_response ( { "deleted" : saved_search_id } )
short_docstring: Delete saved search by ID.
short_docstring_tokens: Delete saved search by ID .
comment: """Delete saved search by ID.
  
    Endpoint deleting saved search by it's ID. Request should contain saved
    search ID. If saved search is successfully deleted, it's ID will be returned.
    If there isn't any saved search with provided ID, 404 status code and
    "No saved search with id <id> found for current user" message will be
    returned.
  
    Args:
      saved_search_id (int): ID of saved search to delete
  
    Returns:
      Flask Response object containing ID of deleted saved search or error
      message if saved search is not found.
    """