Mercurial > piecrust2
diff piecrust/app.py @ 364:81480d0219ba
internal: Return the first route for a source if no metadata match is needed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 29 Apr 2015 23:12:28 -0700 |
parents | dd25bd3ce1f9 |
children | 4b1019bb2533 |
line wrap: on
line diff
--- a/piecrust/app.py Sun Apr 26 15:07:40 2015 -0700 +++ b/piecrust/app.py Wed Apr 29 23:12:28 2015 -0700 @@ -540,7 +540,8 @@ def getRoute(self, source_name, source_metadata, *, skip_taxonomies=False): for route in self.getRoutes(source_name, skip_taxonomies=skip_taxonomies): - if route.matchesMetadata(source_metadata): + if (source_metadata is None or + route.matchesMetadata(source_metadata)): return route return None