From c6e0cfdeba9a6205cdd71e9a83a355e38d584fa7 Mon Sep 17 00:00:00 2001 From: Mohamed Nouffer Date: Thu, 6 Oct 2022 18:06:51 +0530 Subject: [PATCH] update location filter for sight seeing --- rog/views.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rog/views.py b/rog/views.py index 6405229..42eee8e 100644 --- a/rog/views.py +++ b/rog/views.py @@ -140,9 +140,9 @@ def LocationInBound(request): locs = Location.objects.filter(~Q(cp=0), geom__within=pl, category=cat, event_name__isnull=True) else: if grp: - locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, group__contains=grp) + locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, group__contains=grp, location_name__contains='観光') else: - locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True) + locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, location_name__contains='観光') else: if is_rog: if grp: @@ -151,9 +151,9 @@ def LocationInBound(request): locs = Location.objects.filter(~Q(cp=0), geom__within=pl, event_name__isnull=True) else: if grp: - locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, group__contains=grp) + locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, group__contains=grp, location_name__contains='観光') else: - locs = Location.objects.filter(geom__within=pl, event_name__isnull=True) + locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, location_name__contains='観光') if len(locs) > 50: return JsonResponse({"too_many_points": True}, safe=False, status=500) else: