From a2ee67204bdb3dbdd7740aabaf4c0a274fb13ac0 Mon Sep 17 00:00:00 2001 From: gpetrak Date: Fri, 6 Dec 2024 11:43:25 +0200 Subject: [PATCH] rename the property support_time to supports_time --- geonode/layers/api/views.py | 2 +- geonode/layers/models.py | 2 +- geonode/layers/views.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/geonode/layers/api/views.py b/geonode/layers/api/views.py index 178b4099554..6333f76ff23 100644 --- a/geonode/layers/api/views.py +++ b/geonode/layers/api/views.py @@ -224,7 +224,7 @@ def timeseries_info(self, request, pk, *args, **kwards): layer = get_object_or_404(Dataset, id=pk) - if layer.support_time is False: + if layer.supports_time is False: return JsonResponse({"message": "The time dimension is not supported for raster data."}, status=200) if request.method == "GET": diff --git a/geonode/layers/models.py b/geonode/layers/models.py index 29608f9d891..691c534b841 100644 --- a/geonode/layers/models.py +++ b/geonode/layers/models.py @@ -165,7 +165,7 @@ def is_raster(self): return self.subtype == "raster" @property - def support_time(self): + def supports_time(self): if self.is_vector(): return True return False diff --git a/geonode/layers/views.py b/geonode/layers/views.py index ec7313dc908..7012e797af7 100644 --- a/geonode/layers/views.py +++ b/geonode/layers/views.py @@ -333,7 +333,7 @@ def dataset_metadata( ) initial = {} - if layer.support_time and layer.has_time: + if layer.supports_time and layer.has_time: initial = get_time_info(layer) timeseries_form = DatasetTimeSerieForm(instance=layer, prefix="timeseries", initial=initial) @@ -446,7 +446,7 @@ def dataset_metadata( layer.has_time = dataset_form.cleaned_data.get("has_time", layer.has_time) if ( - layer.support_time + layer.supports_time and timeseries_form.cleaned_data and ("has_time" in dataset_form.changed_data or timeseries_form.changed_data) ):