diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c62406..9344403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # HalfAPI +## 0.6.11 + +- Fix "request" has no "path_params" attribute bug + ## 0.6.10 - Add "x-out" field in HTTP headers when "out" parameters are specified for a diff --git a/halfapi/__init__.py b/halfapi/__init__.py index 21023c9..ecd658c 100644 --- a/halfapi/__init__.py +++ b/halfapi/__init__.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -__version__ = '0.6.10' +__version__ = '0.6.11' def version(): return f'HalfAPI version:{__version__}' diff --git a/halfapi/lib/acl.py b/halfapi/lib/acl.py index 8695873..fd5d9ef 100644 --- a/halfapi/lib/acl.py +++ b/halfapi/lib/acl.py @@ -28,7 +28,9 @@ def connected(fct=public): or not hasattr(req.user, 'is_authenticated')): return False - return fct(req, **{**kwargs, **req.path_params}) + if hasattr(req, 'path_params'): + return fct(req, **{**kwargs, **req.path_params}) + return fct(req, **{**kwargs}) return caller