def update_switches(cert, notify_flag=None, rotation_flag=None):
    """
    Toggle notification and/or rotation values which are boolean
    :param notify_flag: new notify value
    :param rotation_flag: new rotation value
    :param cert: Certificate object to be updated
    :return:
    """
    if notify_flag is not None:  # check for None allows value of False to continue
        cert.notify = notify_flag
    if rotation_flag is not None:
        cert.rotation = rotation_flag
    return database.update(cert)

    Toggle notification and/or rotation values which are boolean
    :param notify_flag: new notify value
    :param rotation_flag: new rotation value
    :param cert: Certificate object to be updated
    :return:
    
lemur/certificates/service.py