Changeset 14883
- Timestamp:
- 26 Oct 2017, 08:29:36 (7 years ago)
- Location:
- main/kofacustom.dspg/trunk/src/kofacustom/dspg/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/browser.py
r14882 r14883 58 58 if not store.getFileByContext(self.context, attr=u'o_level_result.jpg'): 59 59 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'): 61 62 if not store.getFileByContext(self.context, attr=u'jamb_result.jpg'): 62 63 return _('No JAMB result uploaded.') 63 elif self.context.current_mode.startswith('hnd'):64 elif cm and cm.startswith('hnd'): 64 65 if not store.getFileByContext(self.context, attr=u'nd_result.jpg'): 65 66 return _('No ND result uploaded.') -
main/kofacustom.dspg/trunk/src/kofacustom/dspg/students/viewlets.py
r14882 r14883 59 59 if self.__name__ in students_utils.SKIP_UPLOAD_VIEWLETS: 60 60 return False 61 return self.context.current_mode.startswith('hnd') 61 cm = getattr(self.context,'current_mode', None) 62 return cm and cm.startswith('hnd') 62 63 63 64 class NDResultImage(StudentImage): … … 122 123 if self.__name__ in students_utils.SKIP_UPLOAD_VIEWLETS: 123 124 return False 124 return self.context.current_mode.startswith('hnd') 125 cm = getattr(self.context,'current_mode', None) 126 return cm and cm.startswith('hnd') 125 127 126 128 class ITLetterImage(StudentImage): … … 153 155 @property 154 156 def label(self): 155 if self.context.current_mode.startswith('hnd'): 157 cm = getattr(self.context,'current_mode', None) 158 if cm and cm.startswith('hnd'): 156 159 return u'JAMB Result / ND Admission Letter (optional)' 157 160 else:
Note: See TracChangeset for help on using the changeset viewer.