Fix warn 'Unable to retrieve request id from context'
'response' object doesn't have 'request' attribute, 'req' should be used instead [1]. This patch fixes this error. [1] https://github.com/openstack/freezer-api/blob/master/freezer_api/api/common/middleware.py#L69 Change-Id: Ifec0f1529941e013b6e5d86f0b64579e5fc5f05a Closes-Bug: #1637937 Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This commit is contained in:
@@ -166,7 +166,7 @@ class JSONTranslator(HookableMiddlewareMixin, object):
|
||||
class BaseContextMiddleware(Middleware):
|
||||
def process_response(self, response):
|
||||
try:
|
||||
request_id = response.request.context.request_id
|
||||
request_id = response.req.context.request_id
|
||||
except AttributeError:
|
||||
LOG.warning('Unable to retrieve request id from context')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user