From 892de944f926bed2bd81614d2b5f692cfa0f5cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Tue, 24 Oct 2017 13:19:23 +0200 Subject: [PATCH] default for default_update --- src/c3nav/mapdata/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c3nav/mapdata/cache.py b/src/c3nav/mapdata/cache.py index 11a5295b..7de41718 100644 --- a/src/c3nav/mapdata/cache.py +++ b/src/c3nav/mapdata/cache.py @@ -10,6 +10,7 @@ from shapely import prepared from shapely.geometry import box from shapely.ops import unary_union +from c3nav.mapdata.models import MapUpdate from c3nav.mapdata.utils.models import get_submodels @@ -48,7 +49,7 @@ class MapHistory: return cls(resolution, x, y, list(updates), data) except (FileNotFoundError, struct.error): if default_update is None: - raise + default_update = MapUpdate.last_update() new_empty = cls(updates=[default_update]) new_empty.save(filename) return new_empty