use space.pk instead of space.id so everything works wrapped

This commit is contained in:
Laura Klünder 2017-06-18 05:58:24 +02:00
parent 376a6fddbf
commit b773373d73

View file

@ -20,7 +20,7 @@ class EditorViewSet(ViewSet):
def _get_level_geometries(self, level):
buildings = level.buildings.all()
buildings_geom = cascaded_union([building.geometry for building in buildings])
spaces = {space.id: space for space in level.spaces.all()}
spaces = {space.pk: space for space in level.spaces.all()}
holes_geom = []
for space in spaces.values():
if space.outside: