This commit is contained in:
Mohamed Nouffer
2022-05-17 11:56:23 +05:30
parent b4061e9c6e
commit 14b4946894

View File

@ -90,6 +90,8 @@ def LocationInBound(request):
else:
locs = 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)
return JsonResponse(serializer.data, safe=False)
else: