Changeset 8490 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 22 May 2012, 08:02:09 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r8349 r8490 259 259 # be changed if empty 260 260 conv_dict['state'] = IGNORE_MARKER 261 262 try: 263 # Correct stud_id counter. As the IConverter for students 264 # creates student objects that are not used afterwards, we 265 # have to fix the site-wide student_id counter. 266 site = grok.getSite() 267 students = site['students'] 268 students._curr_stud_id -= 1 269 except (KeyError, TypeError, AttributeError): 270 pass 261 271 return errs, inv_errs, conv_dict 262 272 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r8489 r8490 322 322 323 323 def test_checkConversion(self): 324 # Make sure we can check conversions and that the stud_id 325 # counter is not raised during such checks. 326 initial_stud_id = self.app['students']._curr_stud_id 324 327 errs, inv_errs, conv_dict = self.processor.checkConversion( 325 328 dict(reg_number='1', state='admitted')) … … 334 337 self.assertEqual(len(errs),1) 335 338 self.assertTrue(('state', 'not allowed') in errs) 339 new_stud_id = self.app['students']._curr_stud_id 340 self.assertEqual(initial_stud_id, new_stud_id) 341 return 336 342 337 343 def test_delEntry(self):
Note: See TracChangeset for help on using the changeset viewer.