@needs_mail
@needs_link
def redirect_link(request, mail, link):
    """
    Redirects to the link target and marks this mail as read
    """
    mail.on_landing(request)
    target = link.click(mail)
    if isinstance(target, types.FunctionType):
        return HttpResponseRedirect(reverse('pennyblack.proxy', args=(mail.mail_hash, link.link_hash)))
    ga_tracking = "utm_source=%s&utm_medium=%s&utm_campaign=%s" % (
        mail.job.newsletter.utm_source, mail.job.newsletter.utm_medium,
        mail.job.utm_campaign)
    if 0 > target.find('?'):
        target = '%s&%s' % (target, ga_tracking)
    else:
        target = '%s?%s' % (target, ga_tracking)
    return HttpResponseRedirect(target)
dataset/ETHPy150Open allink/pennyblack/pennyblack/views.py/redirect_link/swapped operands of `>`