- Timestamp:
- 16 Oct 2012, 04:31:16 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py
r8993 r9341 88 88 return 89 89 90 def moveCertificate(self, fac, dep): 91 self.moved = True 92 cert = self 93 del self.__parent__[cert.code] 94 grok.getSite()['faculties'][fac][dep].certificates[cert.code] = cert 95 self.__parent__._p_changed = True 96 cat = getUtility(ICatalog, name='students_catalog') 97 results = cat.searchResults(certcode=(cert.code, cert.code)) 98 for student in results: 99 notify(grok.ObjectModifiedEvent(student)) 100 student.__parent__.logger.info( 101 '%s - Certificate moved' % student.__name__) 102 103 return 104 90 105 class CertificateFactory(grok.GlobalUtility): 91 106 """A factory for certificates. … … 138 153 student studycourse objects are removed. 139 154 """ 155 # Do not remove referrer if certificate is going to move 156 if getattr(certificate, 'moved', False): 157 return 158 140 159 code = certificate.code 141 160
Note: See TracChangeset for help on using the changeset viewer.