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

Disabled serialization for JSON type columns #306

Merged
merged 2 commits into from
Jul 16, 2015

Conversation

colavitam
Copy link
Contributor

The default migration uses the JSON type for databases (such as Postgres) that support it. The concern no longer attempts to invalidly serialize the tokens field if it is backed by a JSON column. This fixes the TypeError encountered when the JSON field is nil (as it is by default). The tests have also been updated to test the JSON column type if it is available. I have also bumped the postgresql version on Travis CI to 9.3 so JSON datatypes would be available to test.

This also resolves #271 by explicitly checking if the tokens field is nil before attempting to delete expired tokens.

@colavitam colavitam changed the title Disabled serialization for JSON type columns. Disabled serialization for JSON type columns Jul 15, 2015
@booleanbetrayal
Copy link
Collaborator

This is great @colavitam. Thanks for this PR!

booleanbetrayal added a commit that referenced this pull request Jul 16, 2015
Disabled serialization for JSON type columns
@booleanbetrayal booleanbetrayal merged commit 32afa6d into lynndylanhurley:master Jul 16, 2015
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.

Can not save a user with nil tokens attribute
2 participants