def author_addon_clicked(f):
    """Decorator redirecting clicks on "Other add-ons by author"."""
    @functools.wraps(f)
    def decorated(request, *args, **kwargs):
        redirect_id = request.GET.get('addons-author-addons-select', None)
        if not redirect_id:
            return f(request, *args, **kwargs)
        try:
            target_id = int(redirect_id)
            return http.HttpResponsePermanentRedirect(reverse(
                'addons.detail', args=[target_id]))
        except __HOLE__:
            return http.HttpResponseBadRequest('Invalid add-on ID.')
    return decorated
dataset/ETHPy150Open mozilla/addons-server/src/olympia/addons/views.py/author_addon_clicked