fix sign up forms

This commit is contained in:
Pierre-antoine Comby 2019-08-11 17:39:05 +02:00
parent 633663f95d
commit 4a52272558
5 changed files with 21 additions and 20 deletions

View file

@ -138,11 +138,11 @@ class Membership(models.Model):
verbose_name_plural = _('memberships')
@receiver(post_save, sender=settings.AUTH_USER_MODEL)
def save_user_profile(instance, created, **_kwargs):
"""
Hook to save an user profile when an user is updated
"""
if created:
Profile.objects.create(user=instance)
instance.profile.save()
# @receiver(post_save, sender=settings.AUTH_USER_MODEL)
# def save_user_profile(instance, created, **_kwargs):
# """
# Hook to save an user profile when an user is updated
# """
# if created:
# Profile.objects.create(user=instance)
# instance.profile.save()