Ignore:
Timestamp:
26 Oct 2017, 08:29:36 (7 years ago)
Author:
Henrik Bettermann
Message:

Catch error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py

    r14882 r14883  
    5858        if not store.getFileByContext(self.context, attr=u'o_level_result.jpg'):
    5959            return _('No O Level result uploaded.')
    60         if self.context.current_mode.startswith('nd'):
     60        cm = getattr(self.context,'current_mode', None)
     61        if cm and cm.startswith('nd'):
    6162            if not store.getFileByContext(self.context, attr=u'jamb_result.jpg'):
    6263                return _('No JAMB result uploaded.')
    63         elif self.context.current_mode.startswith('hnd'):
     64        elif cm and cm.startswith('hnd'):
    6465            if not store.getFileByContext(self.context, attr=u'nd_result.jpg'):
    6566                return _('No ND result uploaded.')
Note: See TracChangeset for help on using the changeset viewer.