Ignore:
Timestamp:
2 Aug 2022, 22:53:36 (2 years ago)
Author:
Henrik Bettermann
Message:

Doesn't work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py

    r17054 r17055  
    251251        # Save student_id
    252252        self.student_id = student.student_id
    253         try:
    254             if graduated:
    255                 # Set state
    256                 IWorkflowState(student).setState('graduated')
    257                 # Save the certificate and set study course attributes
    258                 self._setGraduatedStudyCourseAttributes(student['studycourse'])
    259             else:
    260                 # Fire transitions
    261                 IWorkflowInfo(self).fireTransition('create')
    262                 IWorkflowInfo(student).fireTransition('admit')
    263                 # Save the certificate and set study course attributes
    264                 self._setStudyCourseAttributes(student['studycourse'])
    265         except ConstraintNotSatisfied, err:
    266             return False, _('ConstraintNotSatisfied: ${a}', mapping = {'a':err})
     253        if graduated:
     254            # Set state
     255            IWorkflowState(student).setState('graduated')
     256            # Save the certificate and set study course attributes
     257            self._setGraduatedStudyCourseAttributes(student['studycourse'])
     258        else:
     259            # Fire transitions
     260            IWorkflowInfo(self).fireTransition('create')
     261            IWorkflowInfo(student).fireTransition('admit')
     262            # Save the certificate and set study course attributes
     263            self._setStudyCourseAttributes(student['studycourse'])
    267264        # Set password
    268265        IUserAccount(student).setPassword(self.application_number)
Note: See TracChangeset for help on using the changeset viewer.