Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Copy Markdown

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
Copy Markdown
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.

profile_wiz.card_info.csc = credit_card_form.cvv.data

with Transaction().set_context(return_profile=True):
Expand Down