Changeset 5992 for main/waeup.sirp/trunk
- Timestamp:
- 28 Apr 2011, 01:59:47 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py
r5053 r5992 17 17 from waeup.sirp.interfaces import IUniversity 18 18 from waeup.sirp.catalog import QueryResultItem 19 from waeup.sirp.university.interfaces import ICourse, ICertificateCourse 19 from waeup.sirp.university.interfaces import ( 20 ICourse, ICertificateCourse, IDepartment, 21 ) 20 22 21 23 class CourseIndexes(grok.Indexes): … … 57 59 index.index_doc(intids.getId(obj), obj) 58 60 61 @grok.subscribe(IDepartment, grok.IObjectRemovedEvent) 62 def handleDepartmentRemoval(obj, event): 63 """Clear courses and certificates when a department is killed. 64 """ 65 obj.courses.clear() 66 obj.certificates.clear() 67 return 68 59 69 class CourseQueryResultItem(QueryResultItem): 60 70 def __init__(self, context, view):
Note: See TracChangeset for help on using the changeset viewer.