Changeset 8081


Ignore:
Timestamp:
9 Apr 2012, 15:38:39 (13 years ago)
Author:
Henrik Bettermann
Message:

Wow, we didn't notify the students_catalog when a sudycourse was saved and changed. The browser tests didn't catch this malfunction because there we saved data manually and notified the catalog afterwards.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r8069 r8081  
    3333from waeup.kofa.interfaces import MessageFactory as _
    3434from waeup.kofa.payments.interfaces import IOnlinePayment
    35 from waeup.kofa.schoolgrades import ResultEntryField
     35#from waeup.kofa.schoolgrades import ResultEntryField
    3636from waeup.kofa.students.vocabularies import GenderSource
    3737from waeup.kofa.university.vocabularies import (
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8039 r8081  
    186186            return
    187187        if self.searchtype == 'current_session':
    188             self.searchterm = int(self.searchterm)
     188            try:
     189                self.searchterm = int(self.searchterm)
     190            except ValueError:
     191                self.flash('Only year dates allowed (e.g. 2011).')
     192                return
    189193        self.hitlist = search(query=self.searchterm,
    190194            searchtype=self.searchtype, view=self)
     
    625629    def save(self, **data):
    626630        msave(self, **data)
     631        notify(grok.ObjectModifiedEvent(self.context.__parent__))
    627632        return
    628633
     
    10301035                return
    10311036        students_utils = getUtility(IStudentsUtils)
    1032         pay_details  = students_utils.getPaymentDetails(
    1033             p_category,student)
     1037        try:
     1038            pay_details  = students_utils.getPaymentDetails(
     1039                p_category,student)
     1040        except AttributeError:
     1041            self.flash(
     1042                _('Study course data are incomplete.'))
     1043            self.redirect(self.url(self.context))
     1044            return
    10341045        if pay_details['error']:
    10351046            self.flash(pay_details['error'])
Note: See TracChangeset for help on using the changeset viewer.