From c2054e9aa900e7a9bdf825aabdd576cc08eee229 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Tue, 6 Jul 2021 11:28:23 +0200 Subject: [PATCH] [lib.domain.domain_acls] fix ROUTES constant using read_router function --- halfapi/lib/domain.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/halfapi/lib/domain.py b/halfapi/lib/domain.py index ca1358d..9a4ff70 100644 --- a/halfapi/lib/domain.py +++ b/halfapi/lib/domain.py @@ -261,13 +261,7 @@ def router_acls(route_params: Dict, path: List, m_router: ModuleType) -> Generat def domain_acls(m_router, path): - if not hasattr(m_router, 'ROUTES'): - logger.error('Missing *ROUTES* constant in *%s*', m_router.__name__) - #raise Exception(f'No ROUTES constant for {m_router.__name__}') - return - - - routes = m_router.ROUTES + routes = read_router(m_router) for subpath, route_params in routes.items(): path.append(subpath)