diff --git a/auction/views.py b/auction/views.py index 4002553..0dfedd8 100644 --- a/auction/views.py +++ b/auction/views.py @@ -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) \ No newline at end of file