Changeset 11614 for main/waeup.kofa/trunk
- Timestamp:
- 1 May 2014, 17:43:54 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/applicant.py
r10845 r11614 55 55 grok.provides(IApplicant) 56 56 57 create_names = [ 58 'firstname', 'middlename', 'lastname', 59 'sex', 'date_of_birth', 60 'email', 'phone' 61 ] 57 applicant_student_mapping = ( 58 ('firstname', 'firstname'), 59 ('middlename', 'middlename'), 60 ('lastname', 'lastname'), 61 ('sex', 'sex'), 62 ('date_of_birth', 'date_of_birth'), 63 ('email', 'email'), 64 ('phone', 'phone'), 65 ) 62 66 63 67 def __init__(self): … … 134 138 # Set student attributes 135 139 try: 136 for name in self.create_names:137 setattr(student, name, getattr(self, name, None))140 for item in self.applicant_student_mapping: 141 setattr(student, item[1], getattr(self, item[0], None)) 138 142 except RequiredMissing, err: 139 143 return False, 'RequiredMissing: %s' % err
Note: See TracChangeset for help on using the changeset viewer.