rebuild altitudes and level geoms on mapupdate

This commit is contained in:
Laura Klünder 2017-10-19 14:41:42 +02:00
parent 239708af31
commit ed2cedaa87
4 changed files with 6 additions and 18 deletions

View file

@ -46,5 +46,11 @@ class MapUpdate(models.Model):
def save(self, **kwargs):
if self.pk is not None:
raise TypeError
from c3nav.mapdata.models import AltitudeArea
from c3nav.mapdata.render.base import LevelGeometries
AltitudeArea.recalculate()
LevelGeometries.rebuild()
super().save(**kwargs)
cache.set('mapdata:last_update', (self.pk, self.datetime), 900)