Ignore:
Timestamp:
12 Oct 2020, 09:54:11 (4 years ago)
Author:
Henrik Bettermann
Message:

Do it right.

File:
1 edited

Legend:

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

    r16278 r16279  
    203203        try:
    204204            for item in mapping:
    205                 setattr(student, item[1], getattr(self, item[0], None))
     205                if item[0] == 'email':
     206                    setattr(student, item[1], str(getattr(self, item[0], None)))
     207                else:
     208                    setattr(student, item[1], getattr(self, item[0], None))
    206209        except RequiredMissing, err:
    207210            site['students']._curr_stud_id -= 1
    208211            return False, 'RequiredMissing: %s' % err
    209212        except WrongType, err:
    210             if item[0] == 'email':
    211                 setattr(student, item[1], str(getattr(self, item[0], None)))
    212             else:
    213                 return False, 'WrongType: %s' % err
     213            site['students']._curr_stud_id -= 1
     214            return False, 'WrongType: %s' % err
    214215        except:
    215216            site['students']._curr_stud_id -= 1
Note: See TracChangeset for help on using the changeset viewer.