Changeset 12415 for main/waeup.kofa
- Timestamp:
- 8 Jan 2015, 07:09:09 (10 years ago)
- Location:
- main/waeup.kofa/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/CHANGES.txt
r12395 r12415 5 5 =================== 6 6 7 * Modify getWidgetsData so that we always get the same error format. 8 9 * Validate all codes in university. 10 7 11 * Catch traceback when creating an application slip with a corrupted 8 12 image file. 9 13 10 14 * Remove deprecated HTML and REST widgets and use html2dict instead. 11 12 * Do not import codes with spaces.13 15 14 16 * UserProcessor: Check if imported roles do exist in the portal. -
main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt
r12191 r12415 567 567 title_prefix,code,title,--ERRORS-- 568 568 faculty,FAC1,Faculty 1,This object already exists. Skipping. 569 faculty,FAC 5,Faculty 5,code: must not contain spaces569 faculty,FAC 5,Faculty 5,code: Invalid input 570 570 571 571 >>> finished_file = dc_path + '/finished/newfaculties_zope.mgr.create.finished.csv' -
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r12414 r12415 171 171 172 172 #: Regular expressions to check id formats. 173 check_id = re.compile(r"^[a-zA-Z0-9_-]{2, 6}$").match173 check_id = re.compile(r"^[a-zA-Z0-9_-]{2,9}$").match 174 174 175 175 def validate_id(value): -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r12009 r12415 541 541 content, 542 542 'reg_number,firstname,student_id,sex,email,phone,state,date_of_birth,lastname,password,matric_number,--ERRORS--\r\n' 543 '1,Aaren,B123456,m,aa@aa.ng,1234,cleared,1990-01-03,Finau,mypw1,100001,reg_number: reg_number\r\n'544 '2,Aaren,C123456,m,aa@aa.ng,1234,admitted,1990-01-04,Berson,mypw1,100000,matric_number: matric_number\r\n'545 '1,Frank,F123456,m,aa@aa.ng,1234,,1990-01-06,Meyer,,100000,reg_number: reg_number; matric_number: matric_number\r\n'543 '1,Aaren,B123456,m,aa@aa.ng,1234,cleared,1990-01-03,Finau,mypw1,100001,reg_number: Invalid input\r\n' 544 '2,Aaren,C123456,m,aa@aa.ng,1234,admitted,1990-01-04,Berson,mypw1,100000,matric_number: Invalid input\r\n' 545 '1,Frank,F123456,m,aa@aa.ng,1234,,1990-01-06,Meyer,,100000,reg_number: Invalid input; matric_number: Invalid input\r\n' 546 546 '3,Uli,A123456,m,aa@aa.ng,1234,,1990-01-07,Schulz,,100002,This object already exists. Skipping.\r\n' 547 547 ) -
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.