def set_persist_criteria(request, criteria_name, active=True):
    """Set a criteria value on a request object."""
    if not hasattr(request, 'affect_persist'):
        request.affect_persist = {}
    request.affect_persist[criteria_name] = active
