From d7bccaf266b10bef2c253fd4e1d2464c6f38624a Mon Sep 17 00:00:00 2001 From: Niraj Adhikari Date: Mon, 18 Dec 2023 11:25:58 +0545 Subject: [PATCH] fix: check geom type Feature in preview tasks --- src/backend/app/projects/project_crud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/app/projects/project_crud.py b/src/backend/app/projects/project_crud.py index 81f84eae03..045f20511f 100644 --- a/src/backend/app/projects/project_crud.py +++ b/src/backend/app/projects/project_crud.py @@ -2325,7 +2325,7 @@ def is_valid_coordinate(coord): coordinates = ( features[-1].get("geometry", {}).get("coordinates", []) if features else [] ) - elif input_geojson_type == "Feature": + elif input_geojson_type := input_geojson.get("type") == "Feature": coordinates = input_geojson.get("geometry", {}).get("coordinates", []) geometry_type = (