Revert to old delays behaviour (cancel 41070)

Revert "tests: adapt to new delays (#41070)"
Revert "always notify for two days (#41070)"
Revert "close available days a day earlier (#41070)"
This commit is contained in:
Frédéric Péters 2020-05-20 19:37:38 +02:00
parent 7867a21702
commit f115bf6488
3 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ class Command(BaseCommand):
# we don't notify during the weekend
return
tomorrows = [datetime.today() + timedelta(days=1)]
tomorrows.append(datetime.today() + timedelta(days=2))
if datetime.today().weekday() == 4:
# on Fridays we also notify about Sundays (just to be sure) and Mondays
tomorrows.append(datetime.today() + timedelta(days=2))
tomorrows.append(datetime.today() + timedelta(days=3))
for tomorrow in tomorrows:
filter_query = '?filter=all&filter-date=%s&full=on' % tomorrow.strftime('%Y-%m-%d')

View File

@ -159,7 +159,7 @@ class AvailableDaysView(View, SingleObjectMixin):
elif datetime.datetime.today().weekday() == 5:
tomorrow = datetime.datetime.today() + datetime.timedelta(days=2)
else:
tomorrow = datetime.datetime.today() + datetime.timedelta(days=2)
tomorrow = datetime.datetime.today() + datetime.timedelta(days=1)
collect_days = sector.collectday_set.filter(date__gt=tomorrow).order_by('date')
else:
collect_days = []

View File

@ -63,7 +63,7 @@ class EncombrantsTestCase(TestCase):
CollectDay.objects.create(sector=maurin_sector,
date=self.now + datetime.timedelta(days=3))
date=self.now + datetime.timedelta(days=2))
# Maurin