get bbox of postcode areas into results

This commit is contained in:
Sarah Hoffmann
2024-09-28 14:42:32 +02:00
parent 83013f819b
commit 5160a1d577
2 changed files with 15 additions and 0 deletions

View File

@@ -616,6 +616,8 @@ class PostcodeSearch(AbstractSearch):
for prow in await conn.execute(placex_sql, _details_to_bind_params(details)):
result = nres.create_from_placex_row(prow, nres.SearchResult)
if result is not None:
result.bbox = Bbox.from_wkb(prow.bbox)
break
else:
result = nres.create_from_postcode_row(row, nres.SearchResult)