1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-20 17:41:55 +02:00

Invalidate registrations, fix profile creation

This commit is contained in:
Yohann D'ANELLO
2020-04-05 08:01:51 +02:00
parent f10497bac3
commit b1cd46bf7d
8 changed files with 121 additions and 21 deletions

View File

@ -10,7 +10,7 @@ def save_user_profile(instance, created, raw, **_kwargs):
# When provisionning data, do not try to autocreate
return
if created:
if created and instance.is_active:
from .models import Profile
Profile.objects.get_or_create(user=instance)
instance.profile.save()
instance.profile.save()