summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-08-17 07:03:58 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-08-17 07:03:58 (GMT)
commit0f5fc1ca0897161b4a5f25cbc93be616ab4293b0 (patch)
treeb16f4348a8271c051319824ad624495fa3c55f1c
parentcafa8c88e4460bb2502370fec0a719167d961099 (diff)
downloadcombo-plugin-gnm-0f5fc1ca0897161b4a5f25cbc93be616ab4293b0.zip
combo-plugin-gnm-0f5fc1ca0897161b4a5f25cbc93be616ab4293b0.tar.gz
combo-plugin-gnm-0f5fc1ca0897161b4a5f25cbc93be616ab4293b0.tar.bz2
misc: workaround empty opens/closes attributes (#35420)v5.2
-rw-r--r--combo_plugin_gnm/templatetags/gnm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/combo_plugin_gnm/templatetags/gnm.py b/combo_plugin_gnm/templatetags/gnm.py
index b52cb57..e9aceff 100644
--- a/combo_plugin_gnm/templatetags/gnm.py
+++ b/combo_plugin_gnm/templatetags/gnm.py
@@ -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(