We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd58c7d commit 9f754f7Copy full SHA for 9f754f7
pydantic_partials/sentinels.py
@@ -28,12 +28,12 @@ def __get_pydantic_core_schema__(
28
29
@staticmethod
30
def _validate(value: Any, info: core_schema.ValidationInfo) -> 'MissingType':
31
- # Tells Pydantic that our Sentinel value 'Missing' is our validated value.
32
- # return Missing
+ if value is Missing:
+ # Keeps the associated attribute 'deleted/omitted' from model.
33
+ raise PydanticOmit()
34
- # Keeps the associated attribute 'deleted/omitted' from model.
35
- #
36
- raise PydanticOmit()
+ # `value` is not Missing, return it unchanged.
+ return value
37
38
39
def _serialize(value: Any) -> 'MissingType':
0 commit comments