From de72e469d2efbcb702dff88d6ecc64719202bc22 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Mon, 14 Mar 2022 15:16:06 +0100 Subject: [PATCH] [release] 0.6.11 --- CHANGELOG.md | 4 ++++ halfapi/__init__.py | 2 +- halfapi/lib/acl.py | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) 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