Changeset 7211
- Timestamp:
- 26 Nov 2011, 16:01:30 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py
r7195 r7211 122 122 """Clear courses and certificates when a department is killed. 123 123 """ 124 obj.courses.clear() 125 obj.certificates.clear() 124 # We cannot use the 'clear()' method of respective subcontainers 125 # (courses, certificates), because that would not trigger 126 # IObjectRemoved events. 127 for subobj_name in ['courses', 'certificates']: 128 key_list = list(getattr(obj, subobj_name, []).keys()) 129 for key in key_list: 130 del getattr(obj, subobj_name)[key] 126 131 return 127 132
Note: See TracChangeset for help on using the changeset viewer.