summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ishtar_common/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py
index f1236a5ac..f1e2e4b96 100644
--- a/ishtar_common/utils.py
+++ b/ishtar_common/utils.py
@@ -101,6 +101,8 @@ SHORTIFY_STR = ugettext(" (...)")
def shortify(lbl, number=20):
+ if not lbl:
+ lbl = ''
if len(lbl) <= number:
return lbl
return lbl[:number - len(SHORTIFY_STR)] + SHORTIFY_STR