Skip to content

Commit

Permalink
Prevent LookupError when accessing debug_toolbars_var when toolbar is…
Browse files Browse the repository at this point in the history
… being disabled in the middle of a request
  • Loading branch information
Marc Aymerich Gunern committed Apr 18, 2024
1 parent 765f221 commit 05f2343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flask_debugtoolbar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def process_view(self, app, view_func, view_kwargs):

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
Expand Down

0 comments on commit 05f2343

Please sign in to comment.