def apply_referrer(self, user, request):
        try:
            referrer = Referrer.objects.get(pk=request.session.pop(settings.SESSION_KEY))
        except __HOLE__:
            pass
        else:
            user_referrer = UserReferrer(user=user, referrer=referrer)
            user_referrer.save()
dataset/ETHPy150Open byteweaver/django-referral/referral/models.py/UserReferrerManager.apply_referrer