Commit 0b6aa96a authored by Hamza Dely's avatar Hamza Dely
Browse files

Le solde est un attribut du modèle Note, pas Adhérent

parent f22ee8c6
......@@ -14,11 +14,3 @@ def send_mail_after_registration(sender, instance=None, created=False, **kwargs)
"""
if created:
instance.email_user_from_template('Activation de ta note Kfet', 'adherent_bienvenue')
@receiver(post_save, sender=Adherent)
def send_mail_if_negative(sender, instance=None, update_fields=None, **kwargs):
"""
Envoie un mail à l'adhérent lorsque son solde passe en négatif.
"""
if ('solde' in update_fields) and (instance.solde < 0):
instance.email_user_from_template('Passage en négatif', 'adherent_negatif')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment