]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/search/db_searches.py
make code backwards-compatible with older Python versions
[nominatim.git] / nominatim / api / search / db_searches.py
index 9a94b4f658bb3ec49d6388f0400a571716875b57..db35f7265427b1e7b957c468556de4f67e50ec44 100644 (file)
@@ -20,7 +20,7 @@ from nominatim.api.types import SearchDetails, DataLayer, GeometryFormat, Bbox
 import nominatim.api.results as nres
 from nominatim.api.search.db_search_fields import SearchData, WeightedCategories
 
-#pylint: disable=singleton-comparison
+#pylint: disable=singleton-comparison,not-callable
 #pylint: disable=too-many-branches,too-many-arguments,too-many-locals,too-many-statements
 
 def _select_placex(t: SaFromClause) -> SaSelect:
@@ -639,8 +639,8 @@ class PlaceSearch(AbstractSearch):
                                                                   numerals, details)
                                     ), else_=None)
             else:
-                interpol_sql = sa.literal(None)
-                tiger_sql = sa.literal(None)
+                interpol_sql = sa.literal_column('NULL')
+                tiger_sql = sa.literal_column('NULL')
 
             unsort = sa.select(inner, place_sql.scalar_subquery().label('placex_hnr'),
                                interpol_sql.label('interpol_hnr'),