Fix
authorŁukasz Rekucki <lrekucki@gmail.com>
Fri, 2 Oct 2009 09:43:46 +0000 (11:43 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Fri, 2 Oct 2009 09:43:46 +0000 (11:43 +0200)
apps/api/utils.py

index f8be8a1..37a89a2 100644 (file)
@@ -65,7 +65,7 @@ def natural_order(get_key=lambda x: x):
 
     def getter(key):
         nkey = get_key(key)
 
     def getter(key):
         nkey = get_key(key)
-        if not isinstance(key, unicode):
+        if not isinstance(nkey, unicode):
             ukey = nkey.decode('utf-8')
         else:
             ukey = nkey
             ukey = nkey.decode('utf-8')
         else:
             ukey = nkey