Skip to content

Commit

Permalink
🐛 [BUG] Apidae tourism parser now handles missing contact properties
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantoinedupre committed Sep 3, 2024
1 parent bbea8d7 commit 60d520a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CHANGELOG
- ApidaeTrekParser now fallbacks on trace filename extension if no extension property
- ApidaeTrekParser now ignores when no linestring in GPX
- ApidaeTrekParser duration import is fixed for multiple-days treks
- Apidae tourism parser now handles missing contact properties

2.109.1 (2024-08-22)
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion geotrek/tourism/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _filter_comm(self, val, code, multiple=True):
"""
if not val:
return None
vals = [subval['coordonnees']['fr'] for subval in val if subval['type']['id'] == code]
vals = [subval['coordonnees']['fr'] for subval in val if subval.get('type', {}).get('id') == code]
if multiple:
return ' / '.join(vals)
if vals:
Expand Down

0 comments on commit 60d520a

Please sign in to comment.