Do not attempt to parse empty string

This commit is contained in:
Michal Čihař 2012-03-05 14:32:37 +01:00
parent a665b69968
commit 22f1bacfab

View File

@ -493,6 +493,8 @@ class Unit(models.Model):
def get_location_links(self):
ret = []
if len(self.location) == 0:
return ''
for location in self.location.split(','):
location = location.strip()
filename, line = location.split(':')