]> git.parisson.com Git - telemeta.git/commitdiff
fix null locations
authoryomguy <yomguy@parisson.com>
Thu, 27 Oct 2011 11:30:18 +0000 (13:30 +0200)
committeryomguy <yomguy@parisson.com>
Thu, 27 Oct 2011 11:30:18 +0000 (13:30 +0200)
telemeta/templatetags/telemeta_utils.py

index d344e2125f80ad94444289f09663daab44e14d2e..3c678261cd29d3bc50d50b6b559b695a55cc9bdd 100644 (file)
@@ -315,4 +315,7 @@ def profile(user):
 
 @register.filter
 def to_string(list):
-    return list[0].encode('utf-8')
+    if len(list) != 0:
+        return list[0].encode('utf-8')
+    else:
+        return ''