destination_lat and _lon don't get cleaned

This commit is contained in:
Kumi 2021-04-08 11:33:38 +02:00
parent 2963bf9650
commit 6ba35b5722

View file

@ -27,8 +27,8 @@ class InquiryCreateView(InConstructionMixin, CreateView):
return reverse("auction:process_inquiry", args=(self.object.id))
def clean_destination_coords(self):
lat = self.cleaned_data.get("destination_lat", "")
lon = self.cleaned_data.get("destination_lon", "")
lat = self.data.get("destination_lat", "")
lon = self.data.get("destination_lon", "")
if (not lat) or (not lon):
lat, lon = name_to_coords(self.cleaned_data.get("destination_name"))