Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit 11f10c3

Browse files
authored
Merge pull request #62 from MDverse/fix/pydantic-validation-54
fix(pydantic): use model_validate() for metadata validation (#54)
2 parents 8fe0641 + 5f4b293 commit 11f10c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mdverse_scrapers/models/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def validate_metadata_against_model(
2929
Validated model instance or None if validation fails.
3030
"""
3131
try:
32-
return model(**metadata)
32+
return model.model_validate(metadata)
3333
except ValidationError as exc:
3434
logger.warning("Validation error!")
3535
for error in exc.errors():

0 commit comments

Comments
 (0)