From 8a40c8d74b972b123aa2543784fef8c2c7ccaaed Mon Sep 17 00:00:00 2001 From: Richard Marshall <113628824+ASL-rmarshall@users.noreply.github.com> Date: Thu, 13 Nov 2025 20:01:02 +0000 Subject: [PATCH 1/2] Remove value.strip --- cdisc_rules_engine/operations/get_xhtml_errors.py | 1 - 1 file changed, 1 deletion(-) 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 [] From 826453245897f8534774a76b08b52a15f9649645 Mon Sep 17 00:00:00 2001 From: Richard Marshall <113628824+ASL-rmarshall@users.noreply.github.com> Date: Fri, 14 Nov 2025 14:07:18 +0000 Subject: [PATCH 2/2] Add test for null value --- tests/unit/test_operations/test_get_xhtml_errors.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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(