Merge branch 'master' of stigma:platforma
[redakcja.git] / apps / api / utils.py
index f8be8a1..19309ff 100644 (file)
@@ -35,7 +35,7 @@ def validate_form(formclass, source='GET'):
   
     def decorator(func):
         @wraps(func)
-        def decorated(self, request, * args, ** kwargs):
+        def decorated(self, request, *args, **kwargs):
             form = formclass(getattr(request, source), request.FILES)
 
             if not form.is_valid():
@@ -65,7 +65,7 @@ def natural_order(get_key=lambda x: x):
 
     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