Changeset 11592


Ignore:
Timestamp:
22 Apr 2014, 20:47:13 (11 years ago)
Author:
Henrik Bettermann
Message:

In some cases it's useful that _constructMatricNumber returns None. Let's catch these cases.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r11590 r11592  
    544544        if student.certcode is None:
    545545            return _('No certificate assigned.'), None
     546        matric_number = self._constructMatricNumber(student, next_integer)
     547        if not matric_number:
     548            return _('Matriculation number cannot be set.'), None
    546549        try:
    547             student.matric_number = self._constructMatricNumber(
    548                 student, next_integer)
     550            student.matric_number = matric_number
    549551        except MatNumNotInSource:
    550552            return _('Matriculation number exists.'), None
Note: See TracChangeset for help on using the changeset viewer.