[ckan-changes] commit/ckanextiati: amercader: Fix silly variable name bugs

Bitbucket commits-noreply at bitbucket.org
Fri Oct 28 16:43:58 UTC 2011


1 new commit in ckanextiati:


https://bitbucket.org/okfn/ckanextiati/changeset/09e2caa604cc/
changeset:   09e2caa604cc
branch:      spreadsheet-support
user:        amercader
date:        2011-10-28 18:43:46
summary:     Fix silly variable name bugs
affected #:  1 file

diff -r 6c06c5502152521105beab126d693c215b7451a9 -r 09e2caa604cc81298477161abe2f13acc702196c ckanext/iati/controllers/spreadsheet.py
--- a/ckanext/iati/controllers/spreadsheet.py
+++ b/ckanext/iati/controllers/spreadsheet.py
@@ -137,9 +137,9 @@
 
         output = ''
         try:
-            fieldnames = [f[0] for n in CSV_MAPPING]
+            fieldnames = [n[0] for n in CSV_MAPPING]
             writer = csv.DictWriter(f, fieldnames=fieldnames, quoting=csv.QUOTE_ALL)
-            headers = dict( (f[0],f[0]) for n in CSV_MAPPING )
+            headers = dict( (n[0],n[0]) for n in CSV_MAPPING )
             writer.writerow(headers)
 
             packages.sort()
@@ -151,7 +151,7 @@
                     continue
                 if package:
                     row = {}
-                    for fieldname, entity, key in CSV_MAPPING:
+                    for fieldname, entity, key, v in CSV_MAPPING:
                         value = None
                         if entity == 'groups':
                             if len(package['groups']):

Repository URL: https://bitbucket.org/okfn/ckanextiati/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list