Project

General

Profile

0001-misc-ignore-non-request-objects-in-log-filters-35629.patch

Frédéric Péters, 10 Sep 2019 10:03 PM

Download (963 Bytes)

View differences:

Subject: [PATCH] misc: ignore non-request objects in log filters (#35629)

 src/authentic2/log_filters.py | 2 ++
 1 file changed, 2 insertions(+)
src/authentic2/log_filters.py
30 30
        '''
31 31
        from . import middleware
32 32
        request = record.request = getattr(record, 'request', middleware.StoreRequestMiddleware.get_request())
33
        if not hasattr(request, 'META'):
34
            record.request = None
33 35

  
34 36
        if not hasattr(record, 'request_id'):
35 37
            record.request_id = getattr(request, 'request_id', self.DEFAULT_REQUEST_ID)
36
-