From 9cebe6295e283817cff98365a74103f92053e009 Mon Sep 17 00:00:00 2001 From: Irwan Fathurrahman Date: Wed, 18 Sep 2024 13:56:58 +0700 Subject: [PATCH] Remove duplicated queryset of data browser (#304) --- django_project/_version.txt | 2 +- .../geosight/data/api/v1/data_browser/data_browser.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/django_project/_version.txt b/django_project/_version.txt index aa188147d..b0294f635 100644 --- a/django_project/_version.txt +++ b/django_project/_version.txt @@ -1 +1 @@ -1.42.13 \ No newline at end of file +1.42.14 \ No newline at end of file diff --git a/django_project/geosight/data/api/v1/data_browser/data_browser.py b/django_project/geosight/data/api/v1/data_browser/data_browser.py index 7339e868e..c8058a904 100644 --- a/django_project/geosight/data/api/v1/data_browser/data_browser.py +++ b/django_project/geosight/data/api/v1/data_browser/data_browser.py @@ -61,14 +61,6 @@ def serializer_class(self): return IndicatorValueWithPermissionSerializer return IndicatorValueSerializer - def get_queryset(self): - """Return queryset of API.""" - query = super().get_queryset() - ids = query.values_list('id', flat=True) - return IndicatorValue.objects.filter(id__in=list(ids)).order_by( - 'indicator_id', '-date', 'geom_id' - ) - def get_serializer_context(self): """For serializer context.""" context = super().get_serializer_context()