Changeset 14090


Ignore:
Timestamp:
18 Aug 2016, 11:26:38 (8 years ago)
Author:
Henrik Bettermann
Message:

Catch traceback if courses have been removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r14064 r14090  
    122122
    123123    @property
     124    def depcode(self):
     125        try:
     126            code = self.context.course1.__parent__.__parent__.code
     127            return code
     128        except:
     129            return
     130
     131    @property
    124132    def show_pastq_al(self):
    125         return self._show_pastq_putme() \
    126                and self.context.course1.__parent__.__parent__.code in PASTQ_AL
     133        return self._show_pastq_putme() and self.depcode in PASTQ_AL
    127134
    128135    @property
    129136    def show_pastq_bs(self):
    130         return self._show_pastq_putme() \
    131                and self.context.course1.__parent__.__parent__.code in PASTQ_BS
     137        return self._show_pastq_putme() and self.depcode in PASTQ_BS
    132138
    133139    @property
    134140    def show_pastq_eps(self):
    135         return self._show_pastq_putme() \
    136                and self.context.course1.__parent__.__parent__.code in PASTQ_EPS
     141        return self._show_pastq_putme() and self.depcode in PASTQ_EPS
    137142
    138143    @property
    139144    def show_pastq_mss(self):
    140         return self._show_pastq_putme() \
    141                and self.context.course1.__parent__.__parent__.code in PASTQ_MSS
     145        return self._show_pastq_putme() and self.depcode in PASTQ_MSS
    142146
    143147    @property
Note: See TracChangeset for help on using the changeset viewer.