fix describe_custom_locations for spaces that are just a hole
@@ -331,7 +331,10 @@ class Router:
space = self.space_for_point(level=location.level.pk, point=location, restrictions=restrictions)
if not space:
return CustomLocationDescription(space=space, altitude=None, areas=(), near_area=None, near_poi=None)
+ try:
altitude = space.altitudearea_for_point(location).get_altitude(location)
+ except LocationUnreachable:
+ altitude = None
areas, near_area = space.areas_for_point(areas=self.areas, point=location, restrictions=restrictions)
near_poi = space.poi_for_point(pois=self.pois, point=location, restrictions=restrictions)
return CustomLocationDescription(space=space, altitude=altitude,
