Changeset 14648 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 23 Mar 2017, 04:43:44 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r14646 r14648 2577 2577 doclink = DOCLINK + '/academics.html#certificate-courses' 2578 2578 2579 @action(_('Save and return'), style='primary')2580 def save AndReturn(self, **data):2579 @action(_('Save'), style='primary') 2580 def save(self, **data): 2581 2581 parent = self.context.__parent__ 2582 2582 if self.context.level == data['level']: … … 2587 2587 old_level = self.context.level 2588 2588 data['course'] = self.context.course 2589 parent.addCertCourse(**data) 2589 try: 2590 parent.addCertCourse(**data) 2591 except KeyError: 2592 self.flash(_('The chosen certificate course is already ' 2593 'part of this certificate.'), type='warning') 2594 return 2590 2595 parent.delCertCourses(data['course'].code, level=old_level) 2591 2596 self.flash(_('Form has been saved.')) … … 2595 2600 grok.getSite().logger.info( 2596 2601 '%s - renamed: %s to %s' % (ob_class, old_code, new_code)) 2597 self.redirect(self.url(parent)) 2602 self.redirect(self.url(parent) + '/%s_%s/@@manage' % ( 2603 data['course'].code, data['level'])) 2598 2604 return 2599 2605
Note: See TracChangeset for help on using the changeset viewer.