Fixed so now services with no transports are not provided to template

This commit is contained in:
Adolfo Gómez García 2018-11-26 11:44:07 +01:00
parent 9451889bb3
commit eb6065b203

View File

@ -52,7 +52,7 @@ import logging
logger = logging.getLogger(__name__)
__updated__ = '2018-03-14'
__updated__ = '2018-11-26'
def about(request):
@ -212,7 +212,8 @@ def index(request):
logger.debug('Services: {0}'.format(services))
services = sorted(services, key=lambda s: s['name'].upper())
# Sort services and remove services with no transports...
services = [s for s in sorted(services, key=lambda s: s['name'].upper()) if len(s['transports']) > 0]
autorun = False
if len(services) == 1 and GlobalConfig.AUTORUN_SERVICE.getBool(True) and len(services[0]['transports']) > 0: