Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card year expiry date must be saved as Char on the database #24

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

pokoli
Copy link

@pokoli pokoli commented May 2, 2014

No description provided.

@pokoli
Copy link
Author

pokoli commented May 2, 2014

The field is Int on forms and wizards, but stored as char on the database. Let me know if you prefer to store as int on the database.

@sharoonthomas
Copy link

The preference would be to store as Char because that is what most APIs seem to expect.

@pokoli
Copy link
Author

pokoli commented May 3, 2014

So this is the correct way to manage it.

The build Failed, but AFAIU is not caused by my patch.

@@ -721,7 +721,7 @@ def complete_using_credit_card(cls, credit_card_form):
profile_wiz.card_info.expiry_month = \
credit_card_form.expiry_month.data
profile_wiz.card_info.expiry_year = \
credit_card_form.expiry_year.data
str(credit_card_form.expiry_year.data)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not make the expiry_year field itself char ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the validator in the form requires it to be int in order to check correctly that year is in the selection.

Neverdeles, we can cast the selection values to string on the validator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants