mirror of
				https://gitlab.com/animath/si/plateforme.git
				synced 2025-11-04 11:52:20 +01:00 
			
		
		
		
	Make Sympa + payment support optional
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
		@@ -1,6 +1,7 @@
 | 
			
		||||
# Copyright (C) 2024 by Animath
 | 
			
		||||
# SPDX-License-Identifier: GPL-3.0-or-later
 | 
			
		||||
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
from django.core.management import BaseCommand
 | 
			
		||||
 | 
			
		||||
from ...models import Payment
 | 
			
		||||
@@ -13,5 +14,8 @@ class Command(BaseCommand):
 | 
			
		||||
    help = "Envoie un mail de rappel à toustes les participant⋅es qui n'ont pas encore payé ou déclaré de paiement."
 | 
			
		||||
 | 
			
		||||
    def handle(self, *args, **options):
 | 
			
		||||
        if not settings.PAYMENT_MANAGEMENT:
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        for payment in Payment.objects.filter(valid=False).filter(registrations__team__participation__valid=True).all():
 | 
			
		||||
            payment.send_remind_mail()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user