correct comparison done for emailing
This commit is contained in:
parent
3234c916a1
commit
4b2dfbdb34
|
@ -23,7 +23,7 @@ class Command(BaseCommand):
|
|||
famille__liaisonnameidfamille__isnull=False, paye=False):
|
||||
try:
|
||||
notification = InvoiceNotificationEmail.objects.filter(invoice_number=invoice.id).latest()
|
||||
if notification.date_sent < make_aware(datetime.now(), get_current_timezone()) - timedelta(days=notification_timeout):
|
||||
if notification.date_sent > make_aware(datetime.now(), get_current_timezone()) - timedelta(days=notification_timeout):
|
||||
continue
|
||||
except InvoiceNotificationEmail.DoesNotExist:
|
||||
InvoiceNotificationEmail.objects.create(invoice_number=invoice.id)
|
||||
|
|
Reference in New Issue