Changeset 14480 for main/waeup.kofa/trunk
- Timestamp:
- 31 Jan 2017, 11:33:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/vocabularies.py
r13076 r14480 30 30 from waeup.kofa.utils.countries import COUNTRIES 31 31 from waeup.kofa.university.vocabularies import course_levels 32 from waeup.kofa.university.certificate import Certificate 32 33 33 34 … … 60 61 61 62 def study_levels(context): 62 certificate = getattr(context, 'certificate', None) 63 if isinstance(context, Certificate): 64 certificate = context 65 else: 66 certificate = getattr(context, 'certificate', None) 63 67 start_level, end_level = (None, None) 64 68 if certificate is not None: … … 81 85 82 86 def getTitle(self, context, value): 83 certificate = getattr(context, 'certificate', None) 87 if isinstance(context, Certificate): 88 # We use this source also for various reports. 89 # In such a case the context of the source will be the 90 # certificate itself. 91 certificate = context 92 else: 93 certificate = getattr(context, 'certificate', None) 84 94 if certificate is not None: 85 95 start_level = int(certificate.start_level)
Note: See TracChangeset for help on using the changeset viewer.