diff --git a/gestion/dialog/adherent.py b/gestion/dialog/adherent.py index c222a137..ecf4fb56 100644 --- a/gestion/dialog/adherent.py +++ b/gestion/dialog/adherent.py @@ -543,6 +543,15 @@ class Dialog(proprio.Dialog): with self.conn.search(dn=adherent.dn, scope=0, mode='rw')[0] as adherent: for (key, values) in attrs.items(): adherent[key] = values + # On retire les éventuelle bl mail invalide + if key == u'mailExt' or key == u'mail': + for bl in adherent['blacklist']: + now = int(time.time()) + if bl['type'] == u'mail_invalide' and bl['fin'] > now: + bl['fin'] = now + if bl['debut'] > now: + bl['debut'] = now + bl['comm'] += u'- mail rectifié' adherent.validate_changes() adherent.history_gen() adherent.save()