Changeset 8222 for main


Ignore:
Timestamp:
19 Apr 2012, 15:39:17 (12 years ago)
Author:
uli
Message:
  • Fix doImport. Still needs tests.
  • Use code in log messages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/batching.py

    r8220 r8222  
    212212                continue
    213213            setattr(obj, key, value)
    214             changed.append('%s=%s' % (key, value))
     214            log_value = getattr(value, 'code', value)
     215            changed.append('%s=%s' % (key, log_value))
    215216        return ', '.join(changed)
    216217
     
    293294            num += 1
    294295            string_row = self.applyMapping(raw_row, mapping)
     296            if ignore_empty and mode in ('update',):
     297                # replace empty strings with ignore-markers
     298                for key, val in string_row.items():
     299                    if val == '':
     300                        string_row[key] = IGNORE_MARKER
    295301            row = dict(string_row.items()) # create deep copy
    296             if ignore_empty and mode in ('update'):
    297                 # replace empty strings with ignore-markers
    298                 for key, val in row.items():
    299                     if val == '':
    300                         row.update(key=IGNORE_MARKER)
    301302            errs, inv_errs, conv_dict = self.checkConversion(string_row, mode)
    302303            if errs or inv_errs:
Note: See TracChangeset for help on using the changeset viewer.