diff --git a/notifications_utils/logging.py b/notifications_utils/logging.py index 21b0e01b..6c048a75 100644 --- a/notifications_utils/logging.py +++ b/notifications_utils/logging.py @@ -161,4 +161,4 @@ def filter(self, record): @classmethod def _get_api_id(self): - return request.request_id if getattr(request, 'request_id', '') else str(uuid4()).replace('-', '') + return g.request_id if getattr(g, 'request_id', '') else str(uuid4()).replace('-', '')