Skip to content

Commit

Permalink
Fix: ApidaeTrekParser now ignores track file w/o extension
Browse files Browse the repository at this point in the history
  • Loading branch information
marcantoinedupre committed Jun 6, 2024
1 parent 093aad2 commit 428c981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion geotrek/trekking/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def _find_first_plan_with_supported_file_extension(items, supported_extensions):
plans = [item for item in items if item['type'] == 'PLAN']
if not plans:
raise RowImportError('The trek from APIDAE has no attachment with the type "PLAN"')
supported_plans = [plan for plan in plans if plan['traductionFichiers'][0]['extension'] in supported_extensions]
supported_plans = [plan for plan in plans if plan['traductionFichiers'][0].get('extension') in supported_extensions]
if not supported_plans:
raise RowImportError(
"The trek from APIDAE has no attached \"PLAN\" in a supported format. "
Expand Down

0 comments on commit 428c981

Please sign in to comment.