Changeset 17009 for main/waeup.kofa/trunk/src/waeup/kofa
- Timestamp:
- 8 Jul 2022, 06:11:37 (2 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r16976 r17009 979 979 self.browser.open(self.edit_path) 980 980 self.browser.getControl("Add online payment ticket").click() 981 # Session object missing982 self.assertTrue(983 'Session configuration object is not available'984 in self.browser.contents)985 configuration = SessionConfiguration()986 configuration.academic_session = session_1987 self.app['configuration'].addSessionConfiguration(configuration)988 981 self.browser.open(self.edit_path) 989 982 self.browser.getControl("Add online payment ticket").click() … … 1125 1118 self.app['configuration'].addSessionConfiguration(self.configuration) 1126 1119 1127 1128 1120 def test_pay_special_fee(self): 1129 1121 self.prepare_special_container() -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r16545 r17009 62 62 """ 63 63 timestamp = ("%d" % int(time()*10000))[1:] 64 if container.year:65 session = str(container.year)66 try:67 session_config = grok.getSite()['configuration'][session]68 except KeyError:69 return _(u'Session configuration object is not available.')70 64 payment.p_id = "p%s" % timestamp 71 65 payment.p_item = container.title … … 77 71 if applicant.special: 78 72 if applicant.special_application: 73 try: 74 session_config = grok.getSite()['configuration'][ 75 str(payment.p_session)] 76 except KeyError: 77 return _(u'Session configuration object is not available.') 79 78 fee_name = applicant.special_application + '_fee' 80 79 payment.amount_auth = getattr(session_config, fee_name, None)
Note: See TracChangeset for help on using the changeset viewer.