diff --git a/task_sdk/src/airflow/sdk/execution_time/task_runner.py b/task_sdk/src/airflow/sdk/execution_time/task_runner.py index 810b108e2217c..e48ebc389e14c 100644 --- a/task_sdk/src/airflow/sdk/execution_time/task_runner.py +++ b/task_sdk/src/airflow/sdk/execution_time/task_runner.py @@ -195,13 +195,12 @@ def xcom_pull( if TYPE_CHECKING: assert isinstance(msg, XComResult) - value = msg.value - if value is not None: + if msg.value is not None: from airflow.models.xcom import XCom # TODO: Move XCom serialization & deserialization to Task SDK # https://github.com/apache/airflow/issues/45231 - return XCom.deserialize_value(value) + return XCom.deserialize_value(msg) # type: ignore[arg-type] return default def xcom_push(self, key: str, value: Any):