Parcourir la source

Check if we should to send the membership fees email from the model

Add an extra check in the model if call with auto=True.
Grégoire Jadi il y a 7 ans
Parent
commit
8ebe239ee9
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      coin/members/models.py

+ 3 - 0
coin/members/models.py

@@ -280,6 +280,9 @@ class Member(CoinLdapSyncMixin, AbstractUser):
 
         :param auto: is it an auto email? (changes slightly template content)
         """
+        if auto and not self.send_membership_fees_email:
+            return False
+
         from dateutil.relativedelta import relativedelta
         from coin.isp_database.models import ISPInfo