don't crash on places that are always closed (#17841)
This commit is contained in:
parent
9ea4def4ec
commit
a447717fb0
|
@ -57,7 +57,10 @@ def as_opening_hours_badge(data):
|
|||
slots[i] = None
|
||||
slots = [x for x in slots if x]
|
||||
|
||||
if now < slots[0].start:
|
||||
if not slots:
|
||||
klass = 'closed'
|
||||
label = u'Fermé'
|
||||
elif now < slots[0].start:
|
||||
klass = 'closed'
|
||||
verb = u'Réouvre'
|
||||
if slots[0].start.weekday() == today.weekday():
|
||||
|
|
Loading…
Reference in New Issue