misc: workaround empty opens/closes attributes (#35420)
This commit is contained in:
parent
cafa8c88e4
commit
0f5fc1ca08
|
@ -202,7 +202,7 @@ def get_slots_from_mairie_format(data, base_datetime):
|
|||
valid_through = parse_datetime(specification.get('validThrough')) if specification.get('validThrough') else next_week
|
||||
if not valid_from or not valid_through:
|
||||
continue
|
||||
if 'opens' in specification and 'closes' in specification:
|
||||
if specification.get('opens') and specification.get('closes'):
|
||||
# case when opening periods are defined
|
||||
if base_datetime >= valid_from and base_datetime < valid_through:
|
||||
(opening_time, closing_time, day_number) = get_open_close_from_specification(
|
||||
|
|
Loading…
Reference in New Issue