Do not send download reminders if order is placed after download date

This commit is contained in:
Raphael Michel
2020-01-07 11:52:11 +01:00
parent 8e2821b398
commit fdd45a85f0
2 changed files with 10 additions and 2 deletions

View File

@@ -984,7 +984,7 @@ def send_download_reminders(sender, **kwargs):
continue
reminder_date = (o.first_date - timedelta(days=days)).replace(hour=0, minute=0, second=0, microsecond=0)
if now() < reminder_date:
if now() < reminder_date or o.datetime > reminder_date:
continue
with transaction.atomic():