diff piecrust/data/builder.py @ 847:71c4f43d8fc1

data: Don't add route functions or data providers that happen to be null.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 27 Apr 2017 20:53:18 -0700
parents a12ad254176e
children 4850f8c21b6e
line wrap: on
line diff
--- a/piecrust/data/builder.py	Sun Feb 19 22:28:34 2017 -0800
+++ b/piecrust/data/builder.py	Thu Apr 27 20:53:18 2017 -0700
@@ -51,6 +51,9 @@
 
     for route in app.routes:
         name = route.func_name
+        if not name:
+            continue
+
         func = data.get(name)
         if func is None:
             func = CompositeRouteFunction()