Changeset 8310 for main/waeup.kofa/trunk/src/waeup
- Timestamp:
- 29 Apr 2012, 13:41:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py
r8299 r8310 161 161 grok.name('certificates') 162 162 163 deprecated_attributes = [] 164 163 165 def setup(self, site, name, logger): 164 166 return … … 171 173 for r in results: 172 174 o = uidutil.getObject(r) 175 # Add new attributes 173 176 for i in items: 174 if getattr(o,i[0],None) is None:177 if not hasattr(o,i[0]): 175 178 setattr(o,i[0],i[1].missing_value) 176 179 logger.info( 177 180 'CertificatesPlugin: %s attribute %s added.' % ( 178 181 o.code,i[0])) 182 # Remove deprecated attributes 183 for i in self.deprecated_attributes: 184 try: 185 delattr(o,i) 186 logger.info( 187 'CertificatesPlugin: %s attribute %s deleted.' % ( 188 o.code,i)) 189 except AttributeError: 190 pass 179 191 return
Note: See TracChangeset for help on using the changeset viewer.