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

Object of type Timeflake is not JSON serializable #8

Closed
sebst opened this issue Apr 15, 2021 · 2 comments · Fixed by #9
Closed

Object of type Timeflake is not JSON serializable #8

sebst opened this issue Apr 15, 2021 · 2 comments · Fixed by #9

Comments

@sebst
Copy link
Contributor

sebst commented Apr 15, 2021

When using TimeflakePrimaryKeyBinary in a Django model, it is not compatible with DRF out of the box because of the above error message.

@anthonynsimon
Copy link
Owner

Thanks for the PR on this issue! From a first glance it looks good 💯, I will test it out in the coming days.

@sebst
Copy link
Contributor Author

sebst commented Apr 15, 2021

Thanks for your reply!

In addition to PR #9, I'd suggest to also subclass the TimeflakeBinary class from UUIDField which should solve additional issues with DRF. I'll try to submit another PR in the next days.

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 a pull request may close this issue.

2 participants