Mercurial > piecrust2
diff piecrust/data/providersdata.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 | aca04e175488 |
children | 08e02c2a2a1a |
line wrap: on
line diff
--- a/piecrust/data/providersdata.py Sun Feb 19 22:28:34 2017 -0800 +++ b/piecrust/data/providersdata.py Thu Apr 27 20:53:18 2017 -0700 @@ -37,4 +37,5 @@ endpoint = endpoint[e] override = endpoint.get(endpoint_bits[-1]) provider = source.buildDataProvider(self._page, override) - endpoint[endpoint_bits[-1]] = provider + if provider is not None: + endpoint[endpoint_bits[-1]] = provider