Closed karellincoln closed 5 years ago
Currently running into the same issue. There's actually no reason to set self.app
anywhere. init_app
should use the app passed into it. There's no other use for self.app
other than the one line that errors.
This is the correct fix for the problem. Thanks for you time :) Unfortunately this was due to missing unit-tests for the case of lazy-initialization. We need to add extra tests for that case under https://github.com/Workable/flask-log-request-id/blob/develop/tests/request_id_tests.py before merging the branch
Can this be merged now, it's kinda of annoying
I think this one should be reopened. If you download the archive for v0.10.1
and check line 84 in request_id.py
you'll see that it still contains the self.app.config
instead of app.config
Could be that CI somehow packaged the wrong commit/branch?
I tried to simplify the process some months ago, but at the same time the dev didn't want to change a whole lot. I will add this to my todo to fix the branching and only use master.
environment
python 3.7, flask 1.02.Flask-Log-Request-ID==0.10.0
error
while I use Flask Application Factory Pattern:
meet the error
question
did I just change
if self.app.config['LOG_REQUEST_ID_LOG_ALL_REQUESTS']:
toif app.config['LOG_REQUEST_ID_LOG_ALL_REQUESTS']:
to fix the error? Thank you!