diff --git a/server/lib/python/cartodb_services/cartodb_services/tools/coordinates.py b/server/lib/python/cartodb_services/cartodb_services/tools/coordinates.py index 935dba0..b02e801 100644 --- a/server/lib/python/cartodb_services/cartodb_services/tools/coordinates.py +++ b/server/lib/python/cartodb_services/cartodb_services/tools/coordinates.py @@ -45,6 +45,8 @@ def marshall_coordinates(coordinates): def coordinates_to_polygon(coordinates): """Convert a Coordinate array coordinates to a PostGIS polygon""" + if not coordinates: + return None coordinates.append(coordinates[0]) # Close the ring result_coordinates = [] for coordinate in coordinates: