Changeset 6797 for main/waeup.sirp/trunk
- Timestamp:
- 19 Sep 2011, 09:53:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/university/catalog.py
r6778 r6797 45 45 46 46 course_code = grok.index.Field(attribute='getCourseCode') 47 level = grok.index.Field(attribute='level') 47 48 48 49 @grok.subscribe(ICourse, grok.IObjectAddedEvent) … … 71 72 @grok.subscribe(ICourse, grok.IObjectAddedEvent) 72 73 def handleCertificateAdd(obj, event): 73 """Index an added certificate swith the local catalog.74 """Index an added certificate with the local catalog. 74 75 75 76 See handleCourseAdd. … … 82 83 intids = getUtility(IIntIds) 83 84 index = cat['code'] 85 index.index_doc(intids.getId(obj), obj) 86 87 @grok.subscribe(ICertificateCourse, grok.IObjectAddedEvent) 88 def handleCertificateCourseAdd(obj, event): 89 """Index an added certificatecourse with the local catalog. 90 91 See handleCourseAdd. 92 """ 93 try: 94 cat = getUtility(ICatalog, name='certcourses_catalog') 95 except ComponentLookupError: 96 # catalog not available. This might happen during tests. 97 return 98 intids = getUtility(IIntIds) 99 index = cat['course_code'] 84 100 index.index_doc(intids.getId(obj), obj) 85 101
Note: See TracChangeset for help on using the changeset viewer.