Changeset 2672 for WAeUP_SRP/base


Ignore:
Timestamp:
16 Nov 2007, 07:45:48 (17 years ago)
Author:
Henrik Bettermann
Message:

copy names into personal only if clearance name field are not empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/clearance_edit.py

    r2670 r2672  
    7676    clear_doc.edit(mapping = {'cleared_date': current,})
    7777    wftool.doActionFor(info['student'],'clear_and_validate')
    78    
    79     if info['per_review_state'] != 'opened':
    80         wftool.doActionFor(info['per'],'open')
    81    
    82     per_doc = info['per'].getContent()
    83     per_doc.edit(mapping = {'firstname': clear_doc.firstname, 'middlename': clear_doc.middlename, 'lastname': clear_doc.lastname,})
    84    
    85    
    86    
     78
     79
     80    if clear_doc.firstname and clear_doc.lastname:
     81        if info['per_review_state'] != 'opened':
     82            wftool.doActionFor(info['per'],'open')
     83        per_doc = info['per'].getContent()
     84        per_doc.edit(mapping = {'firstname': clear_doc.firstname, 'middlename': clear_doc.middlename, 'lastname': clear_doc.lastname,})
     85
    8786    psm = "Clearance and eligibility record is validated and student is cleared!"
    8887elif clear_and_validate_button and info['review_state'] == "cleared_and_validated":
     
    117116            if not clear_doc.firstname or not clear_doc.lastname:
    118117                logger.info('%s requested clearance without confirming name' % (student_id))
    119                 psm = "Please fill the name fields! First and last name are required. "           
     118                psm = "Please fill the name fields! First and last name are required. "
    120119            else:
    121120                logger.info('%s requested clearance' % (student_id))
Note: See TracChangeset for help on using the changeset viewer.