Skip to content

Commit 4c27843

Browse files
skip missing data
1 parent cbc556f commit 4c27843

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/models-library/src/models_library/utils/serialization.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ def model_dump_with_secrets(
1010
data = settings_obj.model_dump(**pydantic_export_options)
1111

1212
for field_name in settings_obj.model_fields:
13+
if field_name not in data:
14+
continue
15+
1316
field_data = data[field_name]
1417

1518
if isinstance(field_data, SecretStr):

0 commit comments

Comments
 (0)