comparison 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
comparison
equal deleted inserted replaced
846:148ce9bf8664 847:71c4f43d8fc1
35 if e not in endpoint: 35 if e not in endpoint:
36 endpoint[e] = {} 36 endpoint[e] = {}
37 endpoint = endpoint[e] 37 endpoint = endpoint[e]
38 override = endpoint.get(endpoint_bits[-1]) 38 override = endpoint.get(endpoint_bits[-1])
39 provider = source.buildDataProvider(self._page, override) 39 provider = source.buildDataProvider(self._page, override)
40 endpoint[endpoint_bits[-1]] = provider 40 if provider is not None:
41 endpoint[endpoint_bits[-1]] = provider