List pending users
This commit is contained in:
parent
49807d33d9
commit
f10497bac3
11 changed files with 95 additions and 13 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
|
||||
def save_user_note(instance, created, raw, **_kwargs):
|
||||
def save_user_note(instance, raw, **_kwargs):
|
||||
"""
|
||||
Hook to create and save a note when an user is updated
|
||||
"""
|
||||
|
|
@ -10,10 +10,11 @@ def save_user_note(instance, created, raw, **_kwargs):
|
|||
# When provisionning data, do not try to autocreate
|
||||
return
|
||||
|
||||
if created:
|
||||
from .models import NoteUser
|
||||
NoteUser.objects.create(user=instance)
|
||||
instance.note.save()
|
||||
if instance.profile.registration_valid and instance.is_active:
|
||||
# Create note only when the registration is validated
|
||||
from note.models import NoteUser
|
||||
NoteUser.objects.get_or_create(user=instance)
|
||||
instance.note.save()
|
||||
|
||||
|
||||
def save_club_note(instance, created, raw, **_kwargs):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue