Browse 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 7 years ago
parent
commit
8ebe239ee9
1 changed files with 3 additions and 0 deletions
  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)
         :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 dateutil.relativedelta import relativedelta
         from coin.isp_database.models import ISPInfo
         from coin.isp_database.models import ISPInfo