From: noah morrison Date: Mon, 26 Jan 2015 20:13:08 +0000 (-0500) Subject: Fix null values rendering as None. X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=073abd0816378ffbe6ac509587cf8034a14ccc88;p=chevron.git Fix null values rendering as None. --- diff --git a/chevron/renderer.py b/chevron/renderer.py index 86ab624..a3d1e9d 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -59,7 +59,8 @@ def _get_key(key, scopes): # Move into the scope scope = scope[child] # Return the last scope we got - return scope + # or an empty string if falsy + return scope or '' except (TypeError, KeyError): # We couldn't find the key in the current scope # We'll try again on the next pass