|
|
|
@ -110,7 +110,9 @@ def send_user_info_to_mixpanel(sender, instance=None, created=False, **kwargs): |
|
|
|
|
|
|
|
|
|
|
|
@receiver(post_save, sender=User) |
|
|
|
@receiver(post_save, sender=User) |
|
|
|
def auto_create_subscription(sender, instance=None, created=False, **kwargs): |
|
|
|
def auto_create_subscription(sender, instance=None, created=False, **kwargs): |
|
|
|
if not hasattr(instance, 'email_subscription'): |
|
|
|
try: |
|
|
|
|
|
|
|
es = EmailSubscription.objects.get(email=instance.email) |
|
|
|
|
|
|
|
except EmailSubscription.DoesNotExist: |
|
|
|
instance.email_subscription = EmailSubscription.objects.create( |
|
|
|
instance.email_subscription = EmailSubscription.objects.create( |
|
|
|
user=instance, |
|
|
|
user=instance, |
|
|
|
email=instance.email, |
|
|
|
email=instance.email, |
|
|
|
|