Ignore:
Timestamp:
21 Jul 2012, 15:25:18 (12 years ago)
Author:
Henrik Bettermann
Message:

Since row has passed the converter, current_level is an integer.

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

    r9030 r9037  
    450450        """
    451451        current_level = row.get('current_level', None)
    452         if current_level == '999' and \
     452        if current_level == 999 and \
    453453            obj.__parent__.state in FORBIDDEN_POSTGRAD_STATES:
    454454            return 'Not a pg student.'
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r9029 r9037  
    549549            dict(reg_number='1', current_level='100'), self.app)
    550550        self.assertTrue(err is None)
     551        # Since row has passed the converter, current_level is an integer.
    551552        err = self.processor.checkUpdateRequirements(self.student['studycourse'],
    552             dict(reg_number='1', current_level='999'), self.app)
     553            dict(reg_number='1', current_level=999), self.app)
    553554        self.assertTrue(err is None)
    554555        IWorkflowState(self.student).setState('returning')
    555556        err = self.processor.checkUpdateRequirements(self.student['studycourse'],
    556             dict(reg_number='1', current_level='999'), self.app)
     557            dict(reg_number='1', current_level=999), self.app)
    557558        self.assertEqual(err, 'Not a pg student.')
    558559
Note: See TracChangeset for help on using the changeset viewer.