From 44568e37477550bea64b30f831d67d0c87b7961b Mon Sep 17 00:00:00 2001 From: AlexP077 Date: Fri, 24 Feb 2023 17:30:42 +0300 Subject: [PATCH] included/excluded_v2 --- service/utils.py | 4 +--- service/views.py | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/service/utils.py b/service/utils.py index ba0cf17..b399217 100644 --- a/service/utils.py +++ b/service/utils.py @@ -97,6 +97,4 @@ def load_ao_and_rayons(ao_filepath: str, okr = obj['properties']['okrug'] ao = models.AO.objects.get(name=okr) models.Rayon.objects.create(**{'name': name, 'polygon': GEOSGeometry(str(MultiPolygon(coords))), 'AO': ao}) - print('AO and Rayons loaded') - - + print('AO and Rayons loaded') \ No newline at end of file diff --git a/service/views.py b/service/views.py index 58d1455..2102dd2 100644 --- a/service/views.py +++ b/service/views.py @@ -194,8 +194,6 @@ class PlacementPointViewSet(ReadOnlyModelViewSet): age = self.request.GET.get('age[]') included = self.request.GET.get('included[]') excluded = self.request.GET.get('excluded[]') - if not any([location_ids, prediction, categories, status, delta, fact, age]): - qs = models.PlacementPoint.objects.none() if location_ids: location_ids = list(location_ids.split(',')) qs = qs.filter(location_id__in=location_ids)