marshmallow-mongoengine
marshmallow-mongoengine copied to clipboard
GenericReference._serialize() returns a bson.ObjectID instead of a str
GenericReference._serialize()
returns a bson.ObjectID
if it's not missing, where it should be cast to str, a la Reference._serialize()
. This causes JSON serialization issues when attempting to work with GenericReferenceField
s.
Applying the fix from #9 to GenericReference._serialize()
would fix this issue. You may also consider having GenericReference
as a subclass of Reference
such that you'd get it for free.
Thanks for your consideration!