Ignore:
Timestamp:
20 Jun 2015, 07:55:18 (10 years ago)
Author:
Henrik Bettermann
Message:

Improve interfaces for documentation.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
2 edited

Legend:

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

    r13076 r13080  
    192192    history = Attribute('Object history, a list of messages')
    193193    state = Attribute('Registration state')
     194    translated_state = Attribute('Real name of the registration state')
    194195    certcode = Attribute('Certificate code of any chosen study course')
    195196    depcode = Attribute('Department code of any chosen study course')
  • main/waeup.kofa/trunk/src/waeup/kofa/students/student.py

    r13028 r13080  
    125125    @property
    126126    def translated_state(self):
    127         state = registration_states_vocab.getTermByToken(
    128             self.state).title
     127        try:
     128            state = registration_states_vocab.getTermByToken(
     129                self.state).title
     130        except LookupError:  # in unit tests
     131            return
    129132        return state
    130133
Note: See TracChangeset for help on using the changeset viewer.