mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
Merge pull request #3779 from lonvia/fix-zero-devision-direction
Fix direction factor computation on empty strings
This commit is contained in:
@@ -331,7 +331,7 @@ class QueryStruct:
|
||||
of each node.
|
||||
"""
|
||||
n = len(self.nodes) - 1
|
||||
if n == 1 or n >= 50:
|
||||
if n <= 1 or n >= 50:
|
||||
self.dir_penalty = 0
|
||||
elif n == 2:
|
||||
self.dir_penalty = (self.nodes[1].name_address_ratio()
|
||||
|
||||
Reference in New Issue
Block a user