def update(role_id, name, description, users):
    """
    Update a role

    :param role_id:
    :param name:
    :param description:
    :param users:
    :return:
    """
    role = get(role_id)

    if name == 'admin':
        warn_user_updates(name, role.users, users)
    role.name = name
    role.description = description
    role.users = users
    database.update(role)

    log_service.audit_log("update_role", name, f"Role with id {role_id} updated")
    return role

    Update a role

    :param role_id:
    :param name:
    :param description:
    :param users:
    :return:
    
lemur/roles/service.py