|
|
|
@ -112,6 +112,9 @@ def send_user_info_to_mixpanel(sender, instance=None, created=False, **kwargs): |
|
|
|
def auto_create_subscription(sender, instance=None, created=False, **kwargs): |
|
|
|
def auto_create_subscription(sender, instance=None, created=False, **kwargs): |
|
|
|
try: |
|
|
|
try: |
|
|
|
es = EmailSubscription.objects.get(email=instance.email) |
|
|
|
es = EmailSubscription.objects.get(email=instance.email) |
|
|
|
|
|
|
|
if not es.user: |
|
|
|
|
|
|
|
es.user = instance |
|
|
|
|
|
|
|
es.save() |
|
|
|
except EmailSubscription.DoesNotExist: |
|
|
|
except EmailSubscription.DoesNotExist: |
|
|
|
instance.email_subscription = EmailSubscription.objects.create( |
|
|
|
instance.email_subscription = EmailSubscription.objects.create( |
|
|
|
user=instance, |
|
|
|
user=instance, |
|
|
|
|