]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #3248 from lonvia/fix-postcode-area-computation
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 15 Nov 2023 21:10:21 +0000 (22:10 +0100)
committerGitHub <noreply@github.com>
Wed, 15 Nov 2023 21:10:21 +0000 (22:10 +0100)
PHP frontent: fix postcode area computation for address points

lib-sql/functions/address_lookup.sql
nominatim/db/connection.py

index 5d2cb94d1c44214b1a7883e2e45a04ff01491f4f..26ce20738d301d4e3b33c43ff1571fd52a4e9a45 100644 (file)
@@ -262,7 +262,7 @@ BEGIN
       -- If the place had a postcode assigned, take this one only
       -- into consideration when it is an area and the place does not have
       -- a postcode itself.
-      IF location.fromarea AND location.isaddress
+      IF location.fromarea AND location_isaddress
          AND (place.address is null or not place.address ? 'postcode')
       THEN
         place.postcode := null; -- remove the less exact postcode
index a64cbfaf99102ac0b24b56e609ad6462999b229e..fce897bc7250c814d6679188a5c6281a8ac3790c 100644 (file)
@@ -31,7 +31,7 @@ class Cursor(psycopg2.extras.DictCursor):
         """ Query execution that logs the SQL query when debugging is enabled.
         """
         if LOG.isEnabledFor(logging.DEBUG):
-            LOG.debug(self.mogrify(query, args).decode('utf-8')) # type: ignore[arg-type]
+            LOG.debug(self.mogrify(query, args).decode('utf-8'))
 
         super().execute(query, args)