From dceb4a8fee633769fa356e0791c5a63b917761a5 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Fri, 27 Oct 2017 01:34:28 +0200 Subject: [PATCH] Post-user et post_del avec model User aussi --- users/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/users/models.py b/users/models.py index e6f477b7..68b80b25 100644 --- a/users/models.py +++ b/users/models.py @@ -752,6 +752,7 @@ class Club(User): @receiver(post_save, sender=Adherent) @receiver(post_save, sender=Club) +@receiver(post_save, sender=User) def user_post_save(sender, **kwargs): """ Synchronisation post_save : envoie le mail de bienvenue si creation Synchronise le ldap""" @@ -765,6 +766,7 @@ def user_post_save(sender, **kwargs): @receiver(post_delete, sender=Adherent) @receiver(post_delete, sender=Club) +@receiver(post_delete, sender=User) def user_post_delete(sender, **kwargs): """Post delete d'un user, on supprime son instance ldap""" user = kwargs['instance']