From: Sarah Hoffmann Date: Sun, 13 Aug 2023 09:40:49 +0000 (+0200) Subject: avoid lambda SQL in connection with alias tables X-Git-Tag: v4.3.0~28 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/96e5a23727acc29b007f94acfac8ef575d11072f?ds=sidebyside avoid lambda SQL in connection with alias tables --- diff --git a/nominatim/api/search/db_searches.py b/nominatim/api/search/db_searches.py index 02a45e7c..f4684044 100644 --- a/nominatim/api/search/db_searches.py +++ b/nominatim/api/search/db_searches.py @@ -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))