]> git.openstreetmap.org Git - nominatim.git/blobdiff - src/nominatim_api/types.py
penalize postcode searches with multiple name qualifiers
[nominatim.git] / src / nominatim_api / types.py
index 66a3c553f22db94527a9e4e612503e4708209608..e58df47895fa0fc9799745e66ee78b118169ee57 100644 (file)
@@ -144,7 +144,7 @@ class Point(NamedTuple):
         except ValueError as exc:
             raise UsageError('Point parameter needs to be numbers.') from exc
 
-        if x < -180.0 or x > 180.0 or y < -90.0 or y > 90.0:
+        if not -180 <= x <= 180 or not -90 <= y <= 90.0:
             raise UsageError('Point coordinates invalid.')
 
         return Point(x, y)