Commit 0ee3a048 authored by Pierre Arnaud's avatar Pierre Arnaud

Fix error offre-de-transport territoire-couvert is None

parent 8acc9832
......@@ -268,7 +268,7 @@ def index(request):
for el in pois:
territories=', '.join(el['territoire-couvert']['value']) if el.get('territoire-couvert', []) else None
if territories is None:
territories=', '.join(el['offre-de-transport']['value']['territoire-couvert']['value']) if el.get('offre-de-transport', []).get('value', []).get('territoire-couvert', []) else None
territories=', '.join(el['offre-de-transport']['value']['territoire-couvert']['value']) if el.get('offre-de-transport', {}).get('value', {}).get('territoire-couvert', []) else None
last_updates.append(
dict(
id=str(el['_id']),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment