publik: ignore secondary services (unless it's authentic) (#13842)
This commit is contained in:
parent
5101741ef1
commit
81b7ff7d8c
|
@ -27,6 +27,8 @@ def services_js(request, *args, **kwargs):
|
|||
portal_agent_title = None
|
||||
for service_id, services_dict in settings.KNOWN_SERVICES.items():
|
||||
for service_slug, service in services_dict.items():
|
||||
if service.get('secondary') and service_id != 'authentic':
|
||||
continue
|
||||
if service.get('is-portal-agent'):
|
||||
portal_agent_url = service['url']
|
||||
portal_agent_title = service['title']
|
||||
|
@ -34,7 +36,7 @@ def services_js(request, *args, **kwargs):
|
|||
'title': service['title'],
|
||||
'slug': service_slug,
|
||||
'service_id': service_id,
|
||||
'uniq': bool(len(services_dict) == 1),
|
||||
'uniq': bool(len([x for x in services_dict.values() if not x.get('secondary')]) == 1),
|
||||
'url': service['url'],
|
||||
'backoffice_menu_url': service['backoffice-menu-url'],
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue