From 96e5a23727acc29b007f94acfac8ef575d11072f Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 13 Aug 2023 11:40:49 +0200 Subject: [PATCH] avoid lambda SQL in connection with alias tables --- nominatim/api/search/db_searches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.39.5