Prevent LookupError when accessing debug_toolbars_var when toolbar is being disabled in the middle of a request

This commit is contained in:
Marc Aymerich Gunern
2024-04-18 12:16:43 +01:00
parent 765f22126e
commit 05f23436ac
+1 -1
View File
@@ -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