@must_have_permission('write')
@must_not_be_registration
@must_have_addon('forward', 'node')
def forward_config_put(auth, node_addon, **kwargs):
    """Set configuration for forward node settings, adding a log if URL has
    changed.

    :param-json str url: Forward URL
    :param-json bool redirectBool: Auto-redirect
    :param-json int redirectSecs: Auto-redirect timeout
    :raises: HTTPError(400) if values missing or invalid

    """
    try:
        node_addon.url = request.json['url']
        node_addon.label = request.json.get('label')
        node_addon.redirect_bool = request.json['redirectBool']
        node_addon.redirect_secs = int(request.json['redirectSecs'])
    except (KeyError, TypeError, ValueError):
        raise HTTPError(http.BAD_REQUEST)

    # Save settings and get changed fields; crash if validation fails
    try:
        saved_fields = node_addon.save()
    except ValidationError:
        raise HTTPError(http.BAD_REQUEST)

    # Log change if URL updated
    if saved_fields in 'url':
        node_addon.owner.add_log(
            action='forward_url_changed',
            params=dict(
                node=node_addon.owner._id,
                project=node_addon.owner.parent_id,
                forward_url=node_addon.url,
            ),
            auth=auth,
            save=True,
        )

    return {}
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/forward/views/config.py/forward_config_put/swapped operands of `in`