]> git.openstreetmap.org Git - nominatim.git/commitdiff
avoid lambda SQL in connection with alias tables
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 13 Aug 2023 09:40:49 +0000 (11:40 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 13 Aug 2023 09:40:49 +0000 (11:40 +0200)
nominatim/api/search/db_searches.py

index 02a45e7c2d4d9f7db707dc3d69f8cc6051691199..f4684044c6fac08fffa05b6e205ffdd70c1020bd 100644 (file)
@@ -670,7 +670,7 @@ class PlaceSearch(AbstractSearch):
                           .where(thnr.c.indexed_status == 0)
 
             if details.excluded:
-                place_sql = place_sql.where(_exclude_places(thnr))
+                place_sql = place_sql.where(thnr.c.place_id.not_in(sa.bindparam('excluded')))
             if self.qualifiers:
                 place_sql = place_sql.where(self.qualifiers.sql_restrict(thnr))