Skip to content

Commit

Permalink
rename the property support_time to supports_time
Browse files Browse the repository at this point in the history
  • Loading branch information
Gpetrak committed Dec 6, 2024
1 parent 8289c92 commit a2ee672
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion geonode/layers/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion geonode/layers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions geonode/layers/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
):
Expand Down

0 comments on commit a2ee672

Please sign in to comment.