Commit d7fea6b7 authored by Pierre Arnaud's avatar Pierre Arnaud

Code cleaning

parent 93e6dcf1
......@@ -465,8 +465,7 @@ def territoires(request):
obj_response["services"] = item["value"]
elif item["label"] == "Territoire couvert":
for territories in item["value"]:
if territories != u"FR FRANCE (État)" and territories != u"FRANCE METROPOLITAINE (Métropole)":
obj_response["territories"].append(territories)
obj_response["territories"].append(territories)
obj_response["id"] = el["id"]
obj_response["internal"] = request.route_path('organismes', name=slugify(obj_response["name"]), id=el["id"])
result.append(obj_response)
......@@ -482,7 +481,10 @@ def territoires(request):
for el in result:
territories = el.get('territories', [])
if full_name_and_cp in territories or departement_fullname in territories or region_fullname in territories:
if full_name_and_cp in territories \
or departement_fullname in territories \
or region_fullname in territories \
or name == 'france' or name == 'france-metropolitaine':
if el.get("multimodal") == 1:
parse_result["multimodal"].append(el)
elif el.get("niveau") == "National":
......
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