Changeset 5994 for main/waeup.sirp/trunk


Ignore:
Timestamp:
28 Apr 2011, 08:02:51 (14 years ago)
Author:
uli
Message:

Be prepared, if a faculty does not has a valid title_prefix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/university/faculty.py

    r5988 r5994  
    3838
    3939    def longtitle(self):
    40         return "%s %s (%s)" % (inst_types.getTerm(self.title_prefix).title,
    41                                                   self.title,
    42                                                   self.code)
     40        try:
     41            result = "%s %s (%s)" % (
     42                inst_types.getTerm(
     43                    self.title_prefix).title,
     44                self.title, self.code)
     45        except:
     46            result = "%s (%s)" % (self.title, self.code)
     47        return result
    4348       
    4449class FacultyFactory(grok.GlobalUtility):
Note: See TracChangeset for help on using the changeset viewer.