Ignore:
Timestamp:
22 May 2015, 10:12:45 (9 years ago)
Author:
Henrik Bettermann
Message:

Remove quite old bug in doImport: Replace empty strings *and* lists with
ignore-markers in update *and* create mode.

File:
1 edited

Legend:

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

    r12812 r12986  
    320320                continue
    321321            string_row = self.applyMapping(raw_row, mapping)
    322             if ignore_empty and mode in ('update',):
    323                 # replace empty strings with ignore-markers
    324                 for key, val in string_row.items():
    325                     if val == '':
    326                         string_row[key] = IGNORE_MARKER
     322            if ignore_empty:
     323                  # Replace empty strings and empty lists with ignore-markers
     324                  for key, val in string_row.items():
     325                      if val == '' or val == '[]':
     326                          string_row[key] = IGNORE_MARKER
    327327            row = dict(string_row.items()) # create deep copy
    328328            errs, inv_errs, conv_dict = self.checkConversion(string_row, mode)
Note: See TracChangeset for help on using the changeset viewer.