Skip to content

Commit

Permalink
Remove deprecated field usage
Browse files Browse the repository at this point in the history
The 'default' argument to fields is deprecated in Marshmallow. Use 'dump_default' instead.

Solves lidatong#546
  • Loading branch information
rianwouters authored Oct 25, 2024
1 parent dc63902 commit 7d3f999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataclasses_json/mm.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def schema(cls, mixin, infer_missing):
else:
type_ = field.type
options: typing.Dict[str, typing.Any] = {}
missing_key = 'missing' if infer_missing else 'default'
missing_key = 'missing' if infer_missing else 'dump_default'
if field.default is not MISSING:
options[missing_key] = field.default
elif field.default_factory is not MISSING:
Expand Down

0 comments on commit 7d3f999

Please sign in to comment.