We should do this on a separate line:

    url = (
        link.long_url if redirect_target is None
        else add_url_parameter(link.long_url, app_data=redirect_target)
    )