mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-11 05:14:07 +00:00
fix direction factor computation on empty strings
This commit is contained in:
@@ -324,7 +324,7 @@ class QueryStruct:
|
|||||||
of each node.
|
of each node.
|
||||||
"""
|
"""
|
||||||
n = len(self.nodes) - 1
|
n = len(self.nodes) - 1
|
||||||
if n == 1 or n >= 50:
|
if n <= 1 or n >= 50:
|
||||||
self.dir_penalty = 0
|
self.dir_penalty = 0
|
||||||
elif n == 2:
|
elif n == 2:
|
||||||
self.dir_penalty = (self.nodes[1].name_address_ratio()
|
self.dir_penalty = (self.nodes[1].name_address_ratio()
|
||||||
|
|||||||
Reference in New Issue
Block a user