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

Serialization of ListField(ReferenceField) #31

Closed
alexa-infra opened this issue Sep 11, 2014 · 2 comments
Closed

Serialization of ListField(ReferenceField) #31

alexa-infra opened this issue Sep 11, 2014 · 2 comments

Comments

@alexa-infra
Copy link

Now serialization fails with error

DBRef('item', ObjectId('540cddee421aa93370ffa049')) is not JSON serializable

The reason is in result of ListField.to_native method:

[bson.son.SON({'_cls': 'Item', '_ref': DBRef('item', ObjectId('540cddee421aa93370ffa049'))}), ...]

It seems it is related to commit 4cae11f. Reverting this commit solves issue for me, but I'm not sure for what original commit was intended.

@umutbozkurt
Copy link
Owner

Commit 4cae11f is for ListField to serialize decimal, boolean types correctly. Apparently it has broken ObjectId serialization. Will take a look asap

@umutbozkurt
Copy link
Owner

Fixed 6495878, sorry for latency

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

No branches or pull requests

2 participants