X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3bf489cd7c5eec14e56ea6e95156f2209762828a..513504140512d17ddbe0769b2ec3887ee16f7e31:/nominatim/api/search/query.py diff --git a/nominatim/api/search/query.py b/nominatim/api/search/query.py index 2ba49bbe..f2b18f87 100644 --- a/nominatim/api/search/query.py +++ b/nominatim/api/search/query.py @@ -169,7 +169,10 @@ class QueryNode: and ending at the node 'end'. Returns 'None' if no such tokens exist. """ - return next((t.tokens for t in self.starting if t.end == end and t.ttype == ttype), None) + for tlist in self.starting: + if tlist.end == end and tlist.ttype == ttype: + return tlist.tokens + return None @dataclasses.dataclass