Skip to content

Commit

Permalink
fixup! Remove workaround for inefficient query planning
Browse files Browse the repository at this point in the history
  • Loading branch information
mhl committed Oct 26, 2017
1 parent 2b5230d commit 50adce0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mapit/views/areas.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ def areas_by_point(request, srid, x, y, bb=False, format='json'):
if method == 'box':
args['polygons__polygon__bbcontains'] = location
else:
geoms = list(Geometry.objects.filter(polygon__contains=location).defer('polygon'))
args['polygons__in'] = geoms
args['polygons__polygon__contains'] = location
areas = Area.objects.filter(**args)

return output_areas(
Expand Down

0 comments on commit 50adce0

Please sign in to comment.