Changeset 8215 for main/waeup.kofa/trunk/src/waeup/kofa/utils
- Timestamp:
- 19 Apr 2012, 13:04:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py
r8214 r8215 258 258 is a dict with the values from input dict converted. 259 259 260 If mode is ``'create'`` or ``'update'`` then some additional 261 filtering applies: 262 263 - values set to DELETION_MARKER are set to missing_value (or 264 default value if field is required) and 265 266 - values set to IGNORE_MARKER are ignored and thus not part of 267 the returned ``<DATA_DICT>``. 268 260 269 If errors happen, i.e. the error lists are not empty, always 261 270 an empty ``<DATA_DICT>`` is returned. … … 275 284 schema_field = field.interface[field.__name__] 276 285 field_converter = IFieldConverter(schema_field) 277 if mode == 'update': 278 if val == DELETION_MARKER: 286 if mode in ('update', 'create'): 287 if val == IGNORE_MARKER: 288 continue 289 elif val == DELETION_MARKER: 279 290 val = schema_field.missing_value 280 291 if schema_field.required: 281 292 val = schema_field.default 282 293 new_data[key] = val 283 continue284 if val == IGNORE_MARKER:285 294 continue 286 295 request.form.update(
Note: See TracChangeset for help on using the changeset viewer.