Better fix for sha with empty value

This commit is contained in:
Cédric Krier
2008-03-05 16:05:46 +01:00
parent 0cc2cc4a7a
commit 906de9b8e7
+1 -1
View File
@@ -141,7 +141,7 @@ class Sha(Column):
def __init__(self, string, **args):
Column.__init__(self, string=string, size=40, **args)
self._symbol_f = lambda x: sha.new(x or '').hexdigest()
self._symbol_f = lambda x: x and sha.new(x).hexdigest() or ''
self._symbol_set = (self._symbol_c, self._symbol_f)