def recipient(self, obj):
        try:
            if obj.mail_to > 0:
                user = get_user_model().objects.get(id=obj.mail_to, is_staff=True)
                return '{0} {1} <{2}>'.format(user.first_name, user.last_name, user.email)
            else:
                return OrderedDict(self.USER_CHOICES)[obj.mail_to]
        except (get_user_model().DoesNotExist, KeyError):
            return _("Nobody")
dataset/ETHPy150Open awesto/django-shop/shop/admin/notification.py/NotificationAdmin.recipient/original