From be6a06ea8164b001e19ef10164f036f0cf902281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Kervella?= Date: Thu, 26 Oct 2017 22:37:16 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20:=20cr=C3=A9ation=20du=20user=20dans=20le?= =?UTF-8?q?=20ldap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- users/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/users/models.py b/users/models.py index 2a403129..e6f477b7 100644 --- a/users/models.py +++ b/users/models.py @@ -750,7 +750,8 @@ class Club(User): pass -@receiver(post_save, sender=User) +@receiver(post_save, sender=Adherent) +@receiver(post_save, sender=Club) def user_post_save(sender, **kwargs): """ Synchronisation post_save : envoie le mail de bienvenue si creation Synchronise le ldap""" @@ -762,7 +763,8 @@ def user_post_save(sender, **kwargs): regen('mailing') -@receiver(post_delete, sender=User) +@receiver(post_delete, sender=Adherent) +@receiver(post_delete, sender=Club) def user_post_delete(sender, **kwargs): """Post delete d'un user, on supprime son instance ldap""" user = kwargs['instance']