diff --git a/tilecloud_chain/internal_mapcache.py b/tilecloud_chain/internal_mapcache.py index 001a114a2..30a52ccb7 100644 --- a/tilecloud_chain/internal_mapcache.py +++ b/tilecloud_chain/internal_mapcache.py @@ -184,11 +184,12 @@ def compute_tile(self, tile: Tile) -> bool: if tile_.error: _LOG.error("Tile %s %s in error: %s", tile_.tilecoord, tile_.formated_metadata, tile_.error) success = False - if tile_.data is None: + elif tile_.data is None: _LOG.error("Tile %s %s in error: no data", tile_.tilecoord, tile_.formated_metadata) success = False - _LOG.debug("Tile %s %s generated", tile_.tilecoord, tile_.formated_metadata) - self._cache_store.put_one(tile_) + else: + _LOG.debug("Tile %s %s generated", tile_.tilecoord, tile_.formated_metadata) + self._cache_store.put_one(tile_) return success @contextlib.contextmanager