Changeset 13006


Ignore:
Timestamp:
27 May 2015, 15:47:09 (10 years ago)
Author:
Henrik Bettermann
Message:

Catch errors which occur in tests.

File:
1 edited

Legend:

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

    r13003 r13006  
    9696    @property
    9797    def getSessionString(self):
    98         return academic_sessions_vocab.getTerm(
    99             self.level_session).title
     98        try:
     99            session_string = academic_sessions_vocab.getTerm(
     100                self.level_session).title
     101        except LookupError:
     102            return None
     103        return session_string
    100104
    101105    @property
     
    293297            if self.student.state == VALIDATED and self.student.current_session == cas:
    294298                return True
    295         except TypeError: # in unit tests
     299        except AttributeError: # in unit tests
    296300            pass
    297301        return False
Note: See TracChangeset for help on using the changeset viewer.