Commit d8fc4ff5 authored by Pierre Arnaud's avatar Pierre Arnaud

Fix bug when organisme has no offers

parent 85f4390a
......@@ -267,8 +267,8 @@ def organisms(request):
transport_logo=", ".join(transport_logo)
)
)
parse_result["transport"] = sorted(parse_result["transport"], key=lambda k: k['name'])
if parse_result.get("transport"):
parse_result["transport"] = sorted(parse_result["transport"], key=lambda k: k['name'])
return dict(
id=id,
result=parse_result,
......
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