]> Devi Nivas Git - chevron.git/commitdiff
Fix null values rendering as None.
authornoah morrison <noah@morrison.ph>
Mon, 26 Jan 2015 20:13:08 +0000 (15:13 -0500)
committernoah morrison <noah@morrison.ph>
Mon, 26 Jan 2015 20:13:08 +0000 (15:13 -0500)
chevron/renderer.py

index 86ab624d311b441862eb40cd822eee3305fdf47e..a3d1e9d8d8410198c361f3fa6e9a999bc469c9f7 100644 (file)
@@ -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