Skip to content

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

Open
pokoli wants to merge 1 commit intoopenlabs:developfrom
pokoli:fix_add_to_profile
Open

Card year expiry date must be saved as Char on the database#24
pokoli wants to merge 1 commit intoopenlabs:developfrom
pokoli:fix_add_to_profile

Conversation

@pokoli
Copy link
Copy Markdown

@pokoli pokoli commented May 2, 2014

No description provided.

@pokoli
Copy link
Copy Markdown
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
Copy Markdown

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

@pokoli
Copy link
Copy Markdown
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.

Comment thread checkout.py
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.

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