Skip to content

Fix None handling in get_from_context#3

Open
chillenzer wants to merge 1 commit intomichaelrccurtis:mainfrom
chillenzer:fix-none-handling
Open

Fix None handling in get_from_context#3
chillenzer wants to merge 1 commit intomichaelrccurtis:mainfrom
chillenzer:fix-none-handling

Conversation

@chillenzer
Copy link
Copy Markdown

This is a tiny bug fix. In the original version, if a value = deep_get(...) validly sets value = None because that's the value of variable in the context, this would raise a MissingVariable. The new control flow short-circuits if the variable was found and returns this value (including None). Confirmed in our test suite that it fixes the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant