Changeset 8375 for main/waeup.kofa/trunk


Ignore:
Timestamp:
7 May 2012, 05:16:39 (12 years ago)
Author:
Henrik Bettermann
Message:

Do not fire init transition when state has been imported.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

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

    r8335 r8375  
    306306    role_manager.assignRoleToPrincipal(
    307307        'waeup.Applicant', applicant.applicant_id)
    308     IWorkflowInfo(applicant).fireTransition('init')
     308    if applicant.state is None:
     309        IWorkflowInfo(applicant).fireTransition('init')
    309310
    310311    # Assign global applicant role for new applicant (alternative way)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/student.py

    r8323 r8375  
    156156    message.
    157157    """
    158     state = IWorkflowState(student).getState()
    159     if state == CLEARANCE:
     158    if student.state == CLEARANCE:
    160159        student.clearance_locked = False
    161160    else:
     
    174173    role_manager.assignRoleToPrincipal(
    175174        'waeup.local.StudentRecordOwner', student.student_id)
    176     if state is None:
     175    if student.state is None:
    177176        IWorkflowInfo(student).fireTransition('create')
    178177    return
Note: See TracChangeset for help on using the changeset viewer.