Permalink
Browse files

fixed unicode bug

  • Loading branch information...
1 parent f3ab3f9 commit c5b41fd2896825a063dc3fd866c2410bb7284189 @jgeskens jgeskens committed Oct 23, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 models.py
View
@@ -5,7 +5,7 @@
class KeyValueManager(models.Manager):
def lookup(self, key, language):
- digest = sha1(key).hexdigest()
+ digest = sha1(key.encode('utf-8')).hexdigest()
keyvalue, created = self.get_or_create(digest=digest, language=language, defaults={'value': key})
return keyvalue.value

0 comments on commit c5b41fd

Please sign in to comment.