From 22f1bacfab7b5bb3b981932053b666e9a5326f0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 5 Mar 2012 14:32:37 +0100 Subject: [PATCH] Do not attempt to parse empty string --- trans/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trans/models.py b/trans/models.py index c9f02bbec..2bf3af113 100644 --- a/trans/models.py +++ b/trans/models.py @@ -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(':')