Fix city lookup not matching by city name when clicking on the map on the Place selection screens

This commit is contained in:
Michael Hall 2018-08-08 17:03:18 -04:00
parent 8ee6060112
commit e44aba4b55

View file

@ -79,7 +79,7 @@ def city_list(request, *args, **kwargs):
@api_view(['GET'])
def find_city(request):
cities = City.objects.all()
if "name" in request.GET:
if "city" in request.GET:
cities = cities.filter(name=request.GET.get("city"))
if "spr" in request.GET:
cities = cities.filter(spr__name=request.GET.get("spr"))