]> git.openstreetmap.org Git - nominatim.git/blobdiff - src/nominatim_api/v1/helpers.py
fix backward compatibility issues with Python 3.7
[nominatim.git] / src / nominatim_api / v1 / helpers.py
index 9c2208348c9926573e31584f918786a2068ab19f..4e1e4e5577d38ebf067b69d4ed1b83bf4809aa2e 100644 (file)
@@ -62,13 +62,13 @@ def extend_query_parts(queryparts: Dict[str, Any], details: Dict[str, Any],
     """
     parsed = SearchDetails.from_kwargs(details)
     if parsed.geometry_output != GeometryFormat.NONE:
     """
     parsed = SearchDetails.from_kwargs(details)
     if parsed.geometry_output != GeometryFormat.NONE:
-        if GeometryFormat.GEOJSON in parsed.geometry_output:
+        if GeometryFormat.GEOJSON & parsed.geometry_output:
             queryparts['polygon_geojson'] = '1'
             queryparts['polygon_geojson'] = '1'
-        if GeometryFormat.KML in parsed.geometry_output:
+        if GeometryFormat.KML & parsed.geometry_output:
             queryparts['polygon_kml'] = '1'
             queryparts['polygon_kml'] = '1'
-        if GeometryFormat.SVG in parsed.geometry_output:
+        if GeometryFormat.SVG & parsed.geometry_output:
             queryparts['polygon_svg'] = '1'
             queryparts['polygon_svg'] = '1'
-        if GeometryFormat.TEXT in parsed.geometry_output:
+        if GeometryFormat.TEXT & parsed.geometry_output:
             queryparts['polygon_text'] = '1'
     if parsed.address_details:
         queryparts['addressdetails'] = '1'
             queryparts['polygon_text'] = '1'
     if parsed.address_details:
         queryparts['addressdetails'] = '1'