Commits

Marc Kirkwood committed d050210

update_query_data: Using iteritems

Comments (0)

Files changed (1)

url_tools/helper.py

 
 try:
     from django.http.request import QueryDict
-except ImportError: # django 1.4.2
+except ImportError:  # django 1.4.2
     from django.http import QueryDict
 
 from django.utils.encoding import iri_to_uri
         return self.query_dict
 
     def update_query_data(self, **kwargs):
-        for key in kwargs:
-            val = kwargs[key]
+        for key, val in kwargs.iteritems():
             if hasattr(val, '__iter__'):
-                self.query_dict.setlist(key, [v for v in val])
+                self.query_dict.setlist(key, val)
             else:
                 self.query_dict[key] = val