diff --git a/cdisc_rules_engine/operations/get_xhtml_errors.py b/cdisc_rules_engine/operations/get_xhtml_errors.py index b56ddeee8..e5c6c8e99 100644 --- a/cdisc_rules_engine/operations/get_xhtml_errors.py +++ b/cdisc_rules_engine/operations/get_xhtml_errors.py @@ -70,7 +70,6 @@ def _execute_operation(self): return dataset[target].apply(self._ensure_dataset_is_valid_xhtml) def _ensure_dataset_is_valid_xhtml(self, value: str) -> list[str]: - value: str = value.strip() if not value: return [] diff --git a/tests/unit/test_operations/test_get_xhtml_errors.py b/tests/unit/test_operations/test_get_xhtml_errors.py index a61a9b4a3..cc4bdf0f8 100644 --- a/tests/unit/test_operations/test_get_xhtml_errors.py +++ b/tests/unit/test_operations/test_get_xhtml_errors.py @@ -65,6 +65,16 @@ "invalid-namespace", SchemaNotFoundError, ), + ( # null value + "target", + PandasDataset.from_records( + [ + {"target": None}, # noqa: E501 + ] + ), + "http://www.cdisc.org/ns/usdm/xhtml/v1.0", + [[]], + ), ], ) def test_get_xhtml_errors(