Ignore:
Timestamp:
21 Sep 2012, 08:19:35 (12 years ago)
Author:
uli
Message:

Rollback r9209. Looks like multiple merges from trunk confuse svn when merging back into trunk.

Location:
main/waeup.kofa/branches/uli-zc-async
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/branches/uli-zc-async

  • main/waeup.kofa/branches/uli-zc-async/src/waeup/kofa/applicants/applicant.py

    r9209 r9211  
    2727from zope.securitypolicy.interfaces import IPrincipalRoleManager
    2828from zope.interface import implementedBy
    29 from zope.schema.interfaces import RequiredMissing, ConstraintNotSatisfied
     29from zope.schema.interfaces import RequiredMissing
    3030from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    3131from waeup.kofa.image import KofaImageFile
     
    3636from waeup.kofa.interfaces import MessageFactory as _
    3737from waeup.kofa.students.vocabularies import RegNumNotInSource
    38 from waeup.kofa.students.studycourse import StudentStudyCourse
    3938from waeup.kofa.utils.helpers import attrs_to_fields
    4039from waeup.kofa.applicants.interfaces import IApplicant, IApplicantEdit
     
    119118        if self.course_admitted is None:
    120119            return False, _('No course admitted provided.')
    121         # Set student attributes
     120        # Add student object
    122121        try:
    123122            for name in self.create_names:
    124123                setattr(student, name, getattr(self, name, None))
    125124        except RequiredMissing, err:
    126             return False, 'RequiredMissing: %s' % err
    127         except:
    128             return False, 'Error: %s' % err
    129         # Finally prove if the certificate still exists
    130         try:
    131             StudentStudyCourse().certificate = self.course_admitted
    132         except ConstraintNotSatisfied, err:
    133             return False, 'ConstraintNotSatisfied: %s' % self.course_admitted.code
    134         # Add student
     125            return False, _('RequiredMissing: %s' % err)
    135126        site = grok.getSite()
    136127        site['students'].addStudent(student)
    137         # Save student_id
    138128        self.student_id = student.student_id
    139         # Fire transitions
    140129        IWorkflowInfo(self).fireTransition('create')
    141130        IWorkflowInfo(student).fireTransition('admit')
     131
    142132        # Set password
    143133        IUserAccount(student).setPassword(self.application_number)
     134
    144135        # Save the certificate and set session attributes
    145136        student['studycourse'].certificate = self.course_admitted
     
    151142        # Update the catalog
    152143        notify(grok.ObjectModifiedEvent(student))
     144
    153145        # Save application slip
    154146        self._createApplicationPDF(student, view=view)
Note: See TracChangeset for help on using the changeset viewer.