Changeset 12191


Ignore:
Timestamp:
10 Dec 2014, 14:07:27 (10 years ago)
Author:
Henrik Bettermann
Message:

Do not import codes with spaces.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r12190 r12191  
    441.3dev (unreleased)
    55===================
     6
     7* Do not import codes with spaces.
    68
    79* UserProcessor: Check if imported roles do exist in the portal.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt

    r12190 r12191  
    509509    ... FAC1,Faculty 1,faculty
    510510    ... FAC4,Faculty 4,school
     511    ... FAC 5,Faculty 5,faculty
    511512    ... """)
    512513
     
    550551    >>> browser.getControl('Perform import').click()
    551552
    552 One line could not be imported:
     553Two lines could not be imported:
    553554
    554555    >>> print browser.contents
    555556    <!DOCTYPE html PUBLIC...
    556557    ...
    557     ...Processing of 1 rows failed...
     558    ...Processing of 2 rows failed...
    558559    ...Successfully processed 1 rows...
    559560    ...
     
    566567    title_prefix,code,title,--ERRORS--
    567568    faculty,FAC1,Faculty 1,This object already exists. Skipping.
     569    faculty,FAC 5,Faculty 5,code: must not contain spaces
    568570
    569571    >>> finished_file = dc_path + '/finished/newfaculties_zope.mgr.create.finished.csv'
     
    586588    >>> open(dc_path + '/newfaculties_zope.mgr.create.pending.csv', 'wb').write(
    587589    ... """title_prefix,--IGNORE--,code,title
    588     ... faculty,FAC5,Faculty 5
     590    ... faculty,,FAC5,Faculty 5
    589591    ... """)
    590592
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r11849 r12191  
    271271        errs, inv_errs, conv_dict =  converter.fromStringDict(
    272272            row, self.factory_name, mode=mode)
     273        if 'code' in row and ' ' in row['code']:
     274            errs.append(('code','must not contain spaces'))
    273275        return errs, inv_errs, conv_dict
    274276
Note: See TracChangeset for help on using the changeset viewer.