Mercurial > piecrust2
changeset 1163:ed308313bcda
data: Allow combining different data providers.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 01 Oct 2019 07:35:50 -0700 |
parents | c5c98d0fb4ec |
children | 727110ea112a |
files | piecrust/data/providersdata.py |
diffstat | 1 files changed, 0 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/piecrust/data/providersdata.py Tue Oct 01 07:34:19 2019 -0700 +++ b/piecrust/data/providersdata.py Tue Oct 01 07:35:50 2019 -0700 @@ -48,16 +48,6 @@ provider = build_data_provider(pname, source, self._page) endpoint[endpoint_bits[-1]] = provider elif isinstance(existing, DataProvider): - existing_source = existing._sources[0] - if (existing.PROVIDER_NAME != pname or - existing_source.SOURCE_NAME != source.SOURCE_NAME): - raise ConfigurationError( - "Can't combine data providers '%s' and '%' " - "(using sources '%s' and '%s') " - "on endpoint '%s'." % - (existing.PROVIDER_NAME, pname, - existing_source.SOURCE_NAME, source.SOURCE_NAME, - pendpoint)) existing._addSource(source) else: raise ConfigurationError(