Ignore:
Timestamp:
11 Dec 2013, 13:21:37 (11 years ago)
Author:
Henrik Bettermann
Message:

We do not need a default value for p_category.

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

Legend:

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

    r10030 r10842  
    4949    p_category = schema.Choice(
    5050        title = _(u'Payment Category'),
    51         default = u'schoolfee',
     51        #default = u'schoolfee',
    5252        source = PaymentCategorySource(),
    5353        required = True,
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py

    r10232 r10842  
    6363    def category(self):
    6464        utils = getUtility(IKofaUtils)
    65         return utils.PAYMENT_CATEGORIES[self.p_category]
     65        return utils.PAYMENT_CATEGORIES.get(self.p_category, None)
    6666
    6767    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py

    r10296 r10842  
    276276        payment.creation_date = datetime.datetime(2012, 4, 1, 13, 12, 1)
    277277        payment.p_id = 'my-id'
     278        payment.p_category = u'schoolfee'
    278279        payment.p_state = 'paid'
    279280        payment.ac = u'666'
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py

    r10479 r10842  
    634634            'r_code,r_desc,student_id,state,current_session\r\n'
    635635
    636             ',0.0,2012-04-01 13:12:01,schoolfee,1,,,,,unpaid,,0.0,,,,,\r\n'
     636            ',0.0,2012-04-01 13:12:01,,1,,,,,unpaid,,0.0,,,,,\r\n'
    637637            )
    638638        return
     
    901901        payment.amount_auth = 13.13
    902902        payment.p_state = u'paid'
     903        payment.p_category = u'schoolfee'
    903904        self.student['payments']['my-2ndpayment'] = payment
    904905        exporter = StudentPaymentsOverviewExporter()
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_webservices.py

    r10516 r10842  
    177177        payment.amount_auth = 12.12
    178178        payment.p_state = u'paid'
     179        payment.p_category = u'schoolfee'
    179180        self.student['payments']['my-payment'] = payment
    180181        result = server.get_students_by_course('CRS1')
     
    285286        payment.amount_auth = 12.12
    286287        payment.p_state = u'paid'
     288        payment.p_category = u'schoolfee'
    287289        self.student['payments']['my-payment'] = payment
    288290        result = server.get_paid_sessions('123')
Note: See TracChangeset for help on using the changeset viewer.