From c5b6c002fc647b26188677dd55ea70be94131340 Mon Sep 17 00:00:00 2001 From: Lionel Date: Sat, 17 May 2025 00:53:00 +0200 Subject: [PATCH] allow computed_fields to be retrieved in model_validator's data arg during deserialization. --- pydantic_xml/serializers/factories/primitive.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pydantic_xml/serializers/factories/primitive.py b/pydantic_xml/serializers/factories/primitive.py index fa94a6d..cf63ba5 100644 --- a/pydantic_xml/serializers/factories/primitive.py +++ b/pydantic_xml/serializers/factories/primitive.py @@ -67,9 +67,6 @@ def deserialize( sourcemap: Dict[Location, int], loc: Location, ) -> Optional[str]: - if self._computed: - return None - if element is None: return None @@ -132,9 +129,6 @@ def deserialize( sourcemap: Dict[Location, int], loc: Location, ) -> Optional[str]: - if self._computed: - return None - if element is None: return None @@ -202,9 +196,6 @@ def deserialize( sourcemap: Dict[Location, int], loc: Location, ) -> Optional[str]: - if self._computed: - return None - if element is None: return None