Changeset 9701 for main/waeup.kofa/trunk/src/waeup/kofa/accesscodes
- Timestamp:
- 20 Nov 2012, 11:16:38 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/accesscodes/batching.py
r9269 r9701 146 146 errs, inv_errs, conv_dict = converter.fromStringDict( 147 147 row, self.factory_name, mode=mode) 148 if row.has_key('transition') and row.has_key('state'):148 if 'transition' in row and 'state' in row: 149 149 if row['transition'] not in (IGNORE_MARKER, '') and \ 150 150 row['state'] not in (IGNORE_MARKER, ''): 151 151 errs.append(('workflow','not allowed')) 152 152 return errs, inv_errs, conv_dict 153 if row.has_key('transition'):153 if 'transition' in row: 154 154 if row['transition'] not in IMPORTABLE_TRANSITIONS: 155 155 if row['transition'] not in (IGNORE_MARKER, ''): 156 156 errs.append(('transition','not allowed')) 157 if row.has_key('state'):157 if 'state' in row: 158 158 if row['state'] not in IMPORTABLE_STATES: 159 159 if row['state'] not in (IGNORE_MARKER, ''): … … 188 188 # Update state 189 189 # Attention: When importing states the counters remain unchanged. 190 if row.has_key('state'):190 if 'state' in row: 191 191 state = row.get('state', IGNORE_MARKER) 192 192 if state not in (IGNORE_MARKER, ''): … … 198 198 row.pop('state') 199 199 # Trigger transition. Counters are properly changed. 200 if row.has_key('transition'):200 if 'transition' in row: 201 201 transition = row.get('transition', IGNORE_MARKER) 202 202 if transition not in (IGNORE_MARKER, ''): … … 209 209 # random_num string to avoid annoying automatic number transformation 210 210 # by Excel or Calc 211 if row.has_key('random_num'):211 if 'random_num' in row: 212 212 random_num = row.get('random_num', IGNORE_MARKER) 213 213 if random_num not in (IGNORE_MARKER, ''):
Note: See TracChangeset for help on using the changeset viewer.