The StreetIndex constructor was raising an exception when no street was found. With the multi-page renderer, it is very possible to have pages of map without any street or other elements to put in the index, but for convenience we still want to get a StreetIndex object, even if its ._categories list is empty.
Signed-off-by: Thomas Petazzoni <[email protected]> --- ocitysmap2/indexlib/indexer.py | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/ocitysmap2/indexlib/indexer.py b/ocitysmap2/indexlib/indexer.py index a840820..8f1cc53 100644 --- a/ocitysmap2/indexlib/indexer.py +++ b/ocitysmap2/indexlib/indexer.py @@ -65,9 +65,6 @@ class StreetIndex: + self._list_amenities(db, polygon_wkt) + self._list_villages(db, polygon_wkt)) - if not self._categories: - raise commons.IndexEmptyError("Nothing to index") - @property def categories(self): return self._categories -- 1.7.4.1
