diff --git a/halfapi/__init__.py b/halfapi/__init__.py index cc15c38..c99244d 100644 --- a/halfapi/__init__.py +++ b/halfapi/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -__version__ = '0.2.0' +__version__ = '0.2.1' def version(): return f'HalfAPI version:{__version__}' diff --git a/halfapi/lib/routes.py b/halfapi/lib/routes.py index 6450462..38ee11a 100644 --- a/halfapi/lib/routes.py +++ b/halfapi/lib/routes.py @@ -44,7 +44,7 @@ def route_acl_decorator(fct: Callable, acls_mod, params: List[Dict]): @wraps(fct) async def caller(req: Request, *args, **kwargs): for param in params: - if param['acl'](req, *args, **kwargs): + if param.get('acl') and param['acl'](req, *args, **kwargs): """ We merge the 'acl' and 'keys' kwargs values to let the decorated function know which ACL function answered