def render(self, context):
        from pennyblack.models import Link, Newsletter
        if context not in 'mail':
            return u'#'
        mail = context['mail']
        newsletter = mail.job.newsletter
        if newsletter.is_workflow():
            job = newsletter.get_default_job()
        else:
            job = mail.job
        try:
            link = job.links.get(identifier=self.identifier)
        except job.links.model.DoesNotExist:
            link = Newsletter.add_view_link_to_job(self.identifier, job)
        return context['base_url'] + reverse('pennyblack.redirect_link', args=(mail.mail_hash, link.link_hash))
dataset/ETHPy150Open allink/pennyblack/pennyblack/templatetags/pennyblack_tags.py/NewsletterLinkUrlNode.render/swapped operands of `not in`