From 01b6fb9f14e1d883df3b8a62e32423233543b4bf Mon Sep 17 00:00:00 2001 From: noah morrison Date: Mon, 26 Jan 2015 15:57:28 -0500 Subject: [PATCH] Fix 0 and False values not rendering. 0 and False should still be rendered, even though they are falsy. --- chevron/renderer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chevron/renderer.py b/chevron/renderer.py index a3d1e9d..7a3d93d 100644 --- a/chevron/renderer.py +++ b/chevron/renderer.py @@ -60,6 +60,12 @@ def _get_key(key, scopes): scope = scope[child] # Return the last scope we got # or an empty string if falsy + + if scope is 0: + return 0 + if scope is False: + return False + return scope or '' except (TypeError, KeyError): # We couldn't find the key in the current scope -- 2.47.3