Changeset 5949 for main/waeup.sirp/trunk/src/waeup/sirp/browser
- Timestamp:
- 15 Apr 2011, 06:03:44 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r5948 r5949 1100 1100 def addCertificate(self, **data): 1101 1101 certificate = createObject(u'waeup.Certificate') 1102 try: 1103 self.applyData(certificate, **data) 1104 except NoTransitionAvailableError: 1105 self.status = Invalid('Review state cannot be changed to ' 1106 'requested state: no such transition ' 1107 'available in workflow.') 1108 return 1102 self.applyData(certificate, **data) 1103 1104 #try: 1105 # self.applyData(certificate, **data) 1106 #except NoTransitionAvailableError: 1107 # self.status = Invalid('Review state cannot be changed to ' 1108 # 'requested state: no such transition ' 1109 # 'available in workflow.') 1110 # return 1111 1109 1112 try: 1110 1113 self.context.certificates.addCertificate(certificate) … … 1244 1247 @grok.action('Save') 1245 1248 def save(self, **data): 1246 try: 1247 self.applyData(self.context, **data) 1248 except NoTransitionAvailableError: 1249 self.status = Invalid('Review state cannot be changed to ' 1250 'requested state: no such transition ' 1251 'available in workflow.') 1252 return 1249 self.applyData(self.context, **data) 1250 1251 #try: 1252 # self.applyData(self.context, **data) 1253 #except NoTransitionAvailableError: 1254 # self.status = Invalid('Review state cannot be changed to ' 1255 # 'requested state: no such transition ' 1256 # 'available in workflow.') 1257 #return 1253 1258 1254 1259 @grok.action('Save and return') 1255 1260 def saveAndReturn(self, **data): 1256 try: 1257 self.applyData(self.context, **data) 1258 except NoTransitionAvailableError: 1259 self.status = Invalid('Review state cannot be changed to ' 1260 'requested state: no such transition ' 1261 'available in workflow.') 1262 return 1261 self.applyData(self.context, **data) 1262 1263 #try: 1264 # self.applyData(self.context, **data) 1265 #except NoTransitionAvailableError: 1266 # self.status = Invalid('Review state cannot be changed to ' 1267 # 'requested state: no such transition ' 1268 # 'available in workflow.') 1269 # return 1270 1263 1271 self.redirect(self.url(self.context)) 1264 1272 return
Note: See TracChangeset for help on using the changeset viewer.