Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent LookupError when accessing debug_toolbars_var #245

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

glic3rinu
Copy link

If toolbar is being dynamically disabled during process_view then the context var will fail with a LookupError. This fixes the issue by providing a default value for when context var was not initialized during process_request.

… being disabled in the middle of a request
Copy link
Contributor

@macnewbold macnewbold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks!

@macnewbold macnewbold merged commit 48de4e4 into pallets-eco:master Apr 18, 2024
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants