mirror of
https://github.com/pallets-eco/flask-debugtoolbar.git
synced 2026-05-04 23:39:13 -05:00
Prevent LookupError when accessing debug_toolbars_var when toolbar is being disabled in the middle of a request
This commit is contained in:
@@ -196,7 +196,7 @@ class DebugToolbarExtension(object):
|
||||
|
||||
def process_response(self, response):
|
||||
real_request = request._get_current_object()
|
||||
if real_request not in self.debug_toolbars_var.get():
|
||||
if real_request not in self.debug_toolbars_var.get({}):
|
||||
return response
|
||||
|
||||
# Intercept http redirect codes and display an html page with a
|
||||
|
||||
Reference in New Issue
Block a user