do not try to normalize empty coordinates (#20364)
This commit is contained in:
parent
c54766c4e3
commit
d270f6adc7
|
@ -2183,9 +2183,10 @@ class MapWidget(CompositeWidget):
|
|||
def _parse(self, request):
|
||||
CompositeWidget._parse(self, request)
|
||||
self.value = self.get('latlng')
|
||||
lat, lon = self.value.split(';')
|
||||
lat_lon = misc.normalize_geolocation({'lat': lat, 'lon': lon})
|
||||
self.value = '%s;%s' % (lat_lon['lat'], lat_lon['lon'])
|
||||
if self.value:
|
||||
lat, lon = self.value.split(';')
|
||||
lat_lon = misc.normalize_geolocation({'lat': lat, 'lon': lon})
|
||||
self.value = '%s;%s' % (lat_lon['lat'], lat_lon['lon'])
|
||||
|
||||
|
||||
class HiddenErrorWidget(HiddenWidget):
|
||||
|
|
Loading…
Reference in New Issue