update for bound loads location

This commit is contained in:
Mohamed Nouffer
2022-08-26 18:31:54 +05:30
parent daefff4a5b
commit c5b9f482ef

View File

@ -112,7 +112,10 @@ def LocationInBound(request):
else: else:
locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, cp=0) locs = Location.objects.filter(geom__within=pl, category=cat, event_name__isnull=True, cp=0)
else: else:
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True) if is_rog:
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, cp__gt=0)
else:
locs = Location.objects.filter(geom__within=pl, event_name__isnull=True, cp=0)
if len(locs) > 50: if len(locs) > 50:
return JsonResponse({"too_many_points": True}, safe=False, status=500) return JsonResponse({"too_many_points": True}, safe=False, status=500)
else: else: