update
This commit is contained in:
@ -91,10 +91,11 @@ def LocationInBound(request):
|
||||
locs = Location.objects.filter(geom__within=pl, category=cat)
|
||||
else:
|
||||
locs = Location.objects.filter(geom__within=pl)
|
||||
res = Location.objects.filter(geom__within=pl)
|
||||
#res = Location.objects.filter(geom__within=pl)
|
||||
if len(res) > 50:
|
||||
return JsonResponse({"too_many_points": True}, safe=False, status=500)
|
||||
serializer = LocationSerializer(res, many=True)
|
||||
else:
|
||||
serializer = LocationSerializer(locs, many=True)
|
||||
return JsonResponse(serializer.data, safe=False)
|
||||
else:
|
||||
return JsonResponse({}, safe=False)
|
||||
|
||||
Reference in New Issue
Block a user