Fixed name_to_coords call in ICV
This commit is contained in:
parent
6d67541571
commit
6e4ecc4604
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ from django.urls import reverse
|
|||
from public.mixins import InConstructionMixin
|
||||
|
||||
from .models import Inquiry
|
||||
from .helpers import name_to_coords
|
||||
|
||||
class InquiryCreateView(InConstructionMixin, CreateView):
|
||||
model = Inquiry
|
||||
|
@ -29,6 +30,6 @@ class InquiryCreateView(InConstructionMixin, CreateView):
|
|||
lon = self.cleaned_data.get("destination_lon", "")
|
||||
|
||||
if (not lat) or (not lon):
|
||||
lon, lat = get_coords(self.cleaned_data.get("destination_name"))
|
||||
lat, lon = name_to_coords(self.cleaned_data.get("destination_name"))
|
||||
|
||||
return Point(lon, lat)
|
Loading…
Reference in a new issue