X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/11acab073dcbe3138f9208229c29220646e7457e..c6d5dd71ad0d9bae811cc9002248d9399c7fdff7:/apps/funding/management/commands/funding_notify.py?ds=inline diff --git a/apps/funding/management/commands/funding_notify.py b/apps/funding/management/commands/funding_notify.py index a583b2785..305127629 100755 --- a/apps/funding/management/commands/funding_notify.py +++ b/apps/funding/management/commands/funding_notify.py @@ -14,7 +14,7 @@ class Command(BaseCommand): help = 'Sends relevant funding notifications.' def handle(self, **options): - + from datetime import date, timedelta from funding.models import Offer from funding import app_settings @@ -27,7 +27,7 @@ class Command(BaseCommand): offer.notify_end() current = Offer.current() - if (current is not None and + if (current is not None and current.end <= date.today() + timedelta(app_settings.DAYS_NEAR - 1) and not current.notified_near): if verbose: