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

Unable to serialize type field in downstream schemas #152

Open
jbaron34 opened this issue Dec 16, 2021 · 0 comments
Open

Unable to serialize type field in downstream schemas #152

jbaron34 opened this issue Dec 16, 2021 · 0 comments

Comments

@jbaron34
Copy link

jbaron34 commented Dec 16, 2021

What is the purpose of the following line?

result[self.type_field] = obj_type

It's preventing me from applying any special serialization rules to the type field in the downstream schemas since the serialized value is being overwritten by this line with the original, non serialized version.

IMO the decision of whether or not to add the type field to the serialized result should solely be the responsibility of the downstream schema.

I've overridden the _dump method with an exact copy minus this line (and the preceding line) in my own repo which seems to have solved the issue but I don't know if I may have introduced unexpected behaviour elsewhere.

Related to #126

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

1 participant