Ignore:
Timestamp:
8 Jul 2022, 06:11:37 (2 years ago)
Author:
Henrik Bettermann
Message:

Do not require session configuration object for application payments.

File:
1 edited

Legend:

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

    r16545 r17009  
    6262        """
    6363        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.')
    7064        payment.p_id = "p%s" % timestamp
    7165        payment.p_item = container.title
     
    7771        if applicant.special:
    7872            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.')   
    7978                fee_name = applicant.special_application + '_fee'
    8079                payment.amount_auth = getattr(session_config, fee_name, None)
Note: See TracChangeset for help on using the changeset viewer.