fix some errors when routing

This commit is contained in:
Laura Klünder 2016-12-21 11:33:53 +01:00
parent 351f34e584
commit 0445dcc464
2 changed files with 2 additions and 2 deletions

View file

@ -269,7 +269,7 @@ class Graph:
orig_points_i, orig_distances, orig_ctypes = self.get_location_points(origin, 'orig')
dest_points_i, dest_distances, dest_ctypes = self.get_location_points(destination, 'dest')
if not orig_points_i or not dest_points_i:
if not len(orig_points_i) or not len(dest_points_i):
raise NoRouteFound()
add_orig_point = origin if isinstance(origin, PointLocation) else None