- Timestamp:
- 8 Jan 2015, 07:09:09 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/utils/converters.py
r9932 r12415 24 24 from zope.formlib.form import ( 25 25 _widgetKey, WidgetInputError, ValidationError, InputErrors, expandPrefix) 26 from zope.formlib.interfaces import IInputWidget 26 from zope.formlib.interfaces import IInputWidget, ConversionError 27 27 from zope.interface import Interface 28 28 from zope.publisher.browser import TestRequest … … 100 100 if not widget.hasInput(): 101 101 continue 102 103 102 try: 104 103 data[name] = widget.getInputValue() 105 104 except ValidationError, error: 106 # convert field ValidationError to WidgetInputError 107 error = WidgetInputError(widget.name, widget.label, error) 105 error = ConversionError(u'Validation failed') 108 106 errors.append((name, error)) 109 except InputErrors, error: 107 except WidgetInputError, error: 108 error = ConversionError(u'Invalid input') 110 109 errors.append((name, error)) 111 110 except ConversionError, error: 111 errors.append((name, error)) 112 112 return errors 113 113
Note: See TracChangeset for help on using the changeset viewer.