- Timestamp:
- 5 Jan 2013, 13:48:04 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/university/course.py
r9227 r9824 75 75 code = course.code 76 76 77 # Find all certificatecourses that refer to given course ...77 # Find all certificatecourses that refer to given course 78 78 try: 79 79 cat = getUtility(ICatalog, name='certcourses_catalog') … … 83 83 84 84 results = cat.searchResults(course_code=(code, code)) 85 # Only one certcourse per certificate is needed 86 reduced_results = [] 85 87 for certcourse in results: 86 # Remove that referrer... 88 cert = certcourse.__parent__ 89 if cert in [i.__parent__ for i in reduced_results]: 90 continue 91 reduced_results.append(certcourse) 92 # Now we can apply delCertCourse 93 for certcourse in reduced_results: 87 94 cert = certcourse.__parent__ 88 95 cert.delCertCourse(code) 89 cert._p_changed = True90 96 return 91 97
Note: See TracChangeset for help on using the changeset viewer.