Merge branch 'master' of stigma:platforma
[redakcja.git] / apps / api / utils.py
index f6d9b1b..37a89a2 100644 (file)
@@ -65,8 +65,8 @@ def natural_order(get_key=lambda x: x):
 
     def getter(key):
         nkey = get_key(key)
-        if not isinstance(key, unicode):
-            ukey = key.decode('utf-8')
+        if not isinstance(nkey, unicode):
+            ukey = nkey.decode('utf-8')
         else:
             ukey = nkey