kapilt / getpaid

Automatically exported from code.google.com/p/getpaid
0 stars 0 forks source link

CCExpirationDateWidget "Object is of wrong type" validation error with any input #130

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. http://getpaid.googlecode.com/svn/trunk/getpaid-30.buildout r964
2. Checkout 1 buyable item
3. Click "Make Payment"

What is the expected output? What do you see instead?

Expected validation with Month, Year select values

What version of the product are you using? On what operating system?

http://getpaid.googlecode.com/svn/trunk/getpaid-30.buildout r964
linux, buildout with clean python2.4

Please provide any additional information below.

class CCExpirationDateWidget(WithTemplateWidget,DateWidget):
(...)
    def _toFieldValue(self,input):
        print input
        print super(DateWidget, self)._toFieldValue(input)
        return super(DateWidget, self)._toFieldValue(input)

Displays:
2009-02
2009-02-01 00:00:00+00:00

Changing the format string in:

    def _getFormInput(self):
        return ('%s-%s-01
00:00:00+00:00'%(self.getFormYear(),self.getFormMonth()))

Displays:
2009-02-01 00:00:00+00:00
2009-02-01 00:00:00+00:00

But does not correct the validation error.

Original issue reported on code.google.com by jeff.kow...@gmail.com on 20 Oct 2007 at 4:55

GoogleCodeExporter commented 8 years ago
Fixed in r976 by maurits.vanrees  Thanks!

Original comment by jeff.kow...@gmail.com on 24 Oct 2007 at 6:22

GoogleCodeExporter commented 8 years ago

Original comment by cjj.ifpe...@gmail.com on 4 Dec 2007 at 5:03