Changeset 2702


Ignore:
Timestamp:
18 Nov 2007, 07:35:55 (17 years ago)
Author:
Henrik Bettermann
Message:

strip at the right place in importData not in mass_create
(not yet tested)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTool.py

    r2701 r2702  
    16161616            d['Title'] = f2t[pt]['title']
    16171617            for field in f2t[pt]['fields']:
    1618                 d[field] = mapping.get(field,'').strip()
     1618                d[field] = mapping.get(field,'')
    16191619
    16201620            if pt == "StudentApplication":
     
    17931793            return em
    17941794        for item in items:
     1795            item = [k.strip() for k in item]
    17951796            if start:
    17961797                start = False
     
    17981799                logger.info('%s starts import from %s.csv in %s mode with schema and layout %s' % (member,filename,mode,iname))
    17991800                attrs = csv.reader(open("%s/import/%s.csv" % (i_home,filename),"rb")).next()
    1800                 import_keys = [k for k in attrs if not k.startswith('ignore')]
     1801                import_keys = [k.strip() for k in attrs if not k.startswith('ignore')]
    18011802                diff2schema = set(import_keys).difference(set(schema.keys()))
    18021803                diff2layout = set(import_keys).difference(set(layout.keys()))
Note: See TracChangeset for help on using the changeset viewer.