Skip to content

Commit 01c1057

Browse files
committed
Propegate None defaults.
1 parent b6d115d commit 01c1057

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydantic_settings/sources.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ def _add_parser_submodels(
15711571
if self.cli_use_class_docs_for_groups and len(sub_models) == 1:
15721572
model_group_kwargs['description'] = None if sub_models[0].__doc__ is None else dedent(sub_models[0].__doc__)
15731573

1574-
if model_default not in (PydanticUndefined, None):
1574+
if model_default is not PydanticUndefined:
15751575
if is_model_class(type(model_default)) or is_pydantic_dataclass(type(model_default)):
15761576
model_default = getattr(model_default, field_name)
15771577
else:

0 commit comments

Comments
 (0)