app/soc/views/models/base.py
changeset 1864 3d50c8c34d6a
parent 1844 006ca71ed07a
child 1878 25116444358c
--- a/app/soc/views/models/base.py	Sun Mar 15 13:16:38 2009 +0000
+++ b/app/soc/views/models/base.py	Sun Mar 15 13:35:45 2009 +0000
@@ -546,13 +546,11 @@
       content = contents[export]
       key_order = content.get('key_order')
 
-      data = [i.toDict(key_order) for i in content['data']]
+      if key_order:
+        data = [i.toDict(key_order) for i in content['data']]
 
-      if not key_order:
-        data = [i.values() for i in data]
-
-      filename = "export_%d" % export
-      return self.csv(request, data, filename, params, key_order)
+        filename = "export_%d" % export
+        return self.csv(request, data, filename, params, key_order)
 
     context = dicts.merge(context,
         helper.responses.getUniversalContext(request))