add custom handling for Lyon sectors as collectivity labels (#26774)

This commit is contained in:
Frédéric Péters 2018-10-02 10:25:53 +02:00
parent 44815f339f
commit 12f7955ba0
1 changed files with 3 additions and 0 deletions

View File

@ -428,6 +428,9 @@ def as_producer(slug):
except AttributeError:
pass
if producer.startswith('Lyon '): # assume sth like "Lyon 7eme"
producer = 'Lyon'
if settings.KNOWN_SERVICES['hobo'].get('hobo-%s' % producer):
return {'slug': producer,
'label': settings.KNOWN_SERVICES['hobo'].get('hobo-%s' % producer, {'title': ''})['title']}