protect openinghours parsing against null value (#84537)
gitea/combo-plugin-gnm/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-12-11 10:12:40 +01:00
parent 7f240c2090
commit 2577400045
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ def get_slots_from_mdr_format(data, base_datetime):
def parse_opening_hours_data(mairie_data):
"""Parse every known openinghours data formats"""
for openinghours in mairie_data.get('openinghours', []):
for openinghours in mairie_data.get('openinghours') or []:
# format is comma-separated days and/or intervals, or only one day
try:
groups = re.match(