diff --git a/API/api_worker.py b/API/api_worker.py index bf7ba391..9184ce7c 100644 --- a/API/api_worker.py +++ b/API/api_worker.py @@ -70,7 +70,7 @@ def process_raw_data(self, params): ) inside_file_size = 0 polygon_stats = None - if "include_stats" in params: + if "include_stats" in params.dict(): if params.include_stats: feature = { "type": "Feature", diff --git a/src/app.py b/src/app.py index a9bf8fc5..484c6401 100644 --- a/src/app.py +++ b/src/app.py @@ -984,6 +984,7 @@ def get_summary_stats(self): or analytics_data["data"]["polygonStatistic"]["analytics"]["functions"] is None ): + logging.error(analytics_data) return None for function in analytics_data["data"]["polygonStatistic"]["analytics"][ "functions" diff --git a/src/validation/models.py b/src/validation/models.py index 772b1108..c8cf2fae 100644 --- a/src/validation/models.py +++ b/src/validation/models.py @@ -271,7 +271,7 @@ def get_value_as_feature(cls, value): """Converts geometry to geojson feature""" feature = { "type": "Feature", - "geometry": (value.json()), + "geometry": json.loads(value.json()), "properties": {}, } return feature