[lib.domain.domain_acls] fix ROUTES constant using read_router function
This commit is contained in:
parent
0e669b81b0
commit
c2054e9aa9
|
@ -261,13 +261,7 @@ def router_acls(route_params: Dict, path: List, m_router: ModuleType) -> Generat
|
||||||
|
|
||||||
|
|
||||||
def domain_acls(m_router, path):
|
def domain_acls(m_router, path):
|
||||||
if not hasattr(m_router, 'ROUTES'):
|
routes = read_router(m_router)
|
||||||
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
|
|
||||||
|
|
||||||
for subpath, route_params in routes.items():
|
for subpath, route_params in routes.items():
|
||||||
path.append(subpath)
|
path.append(subpath)
|
||||||
|
|
Loading…
Reference in New Issue