Issue 5275, missed the case when lat or long was missing.

svn: r18264
This commit is contained in:
Peter Landgren 2011-10-08 16:26:17 +00:00
parent eef3d6dd64
commit 6828735434

View File

@ -138,24 +138,32 @@ class PlaceBaseModel(object):
return unicode(data[2]) return unicode(data[2])
def column_longitude(self, data): def column_longitude(self, data):
if not data[3]:
return u' '
value = conv_lat_lon('0', data[3], format='DEG')[1] value = conv_lat_lon('0', data[3], format='DEG')[1]
if not value: if not value:
return _("Error in format") return _("Error in format")
return value return value
def column_latitude(self, data): def column_latitude(self, data):
if not data[4]:
return u' '
value = conv_lat_lon(data[4], '0', format='DEG')[0] value = conv_lat_lon(data[4], '0', format='DEG')[0]
if not value: if not value:
return _("Error in format") return _("Error in format")
return value return value
def sort_longitude(self, data): def sort_longitude(self, data):
if not data[3]:
return u' '
value = conv_lat_lon('0', data[3], format='ISO-DMS') if data[3] else u'' value = conv_lat_lon('0', data[3], format='ISO-DMS') if data[3] else u''
if not value: if not value:
return _("Error in format") return _("Error in format")
return value return value
def sort_latitude(self, data): def sort_latitude(self, data):
if not data[4]:
return u' '
value = conv_lat_lon(data[4], '0', format='ISO-DMS') if data[4] else u'' value = conv_lat_lon(data[4], '0', format='ISO-DMS') if data[4] else u''
if not value: if not value:
return _("Error in format") return _("Error in format")