mirror of
				https://gitlab.crans.org/bde/nk20
				synced 2025-11-04 09:12:11 +01:00 
			
		
		
		
	List pending users
This commit is contained in:
		@@ -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):
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user