Skip to content

Field take default on feature#1767

Closed
dormeiri wants to merge 5 commits intomarshmallow-code:devfrom
dormeiri:field-take-default-on-feature
Closed

Field take default on feature#1767
dormeiri wants to merge 5 commits intomarshmallow-code:devfrom
dormeiri:field-take-default-on-feature

Conversation

@dormeiri
Copy link
Copy Markdown

@dormeiri dormeiri commented Mar 19, 2021

Fixes #1766

I noticed that most of the discussion is focused on deserialization, but I have use case where I need this feature for serialization.

This PR adds the ability for the user to extend the logic of when default value is taken during serialization.

TODO:

  • Tests
  • Docs

@sloria
Copy link
Copy Markdown
Member

sloria commented Mar 28, 2021

Something similar is being worked on in #1381 but still needs discussion before landing. Let's continue discussion there

@sloria sloria closed this Mar 28, 2021
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.

Take default value when value is None

3 participants