From 4d86631283971ad0aebc06fc7c6ac83a7b754e7c Mon Sep 17 00:00:00 2001 From: Luka Dragar Date: Mon, 30 Mar 2026 10:03:49 +0200 Subject: [PATCH] No warning messages for partial msds --- conversion_utils/jos_msds_and_properties.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/conversion_utils/jos_msds_and_properties.py b/conversion_utils/jos_msds_and_properties.py index 949b023..cd1cc02 100644 --- a/conversion_utils/jos_msds_and_properties.py +++ b/conversion_utils/jos_msds_and_properties.py @@ -259,7 +259,13 @@ class Converter: def is_valid_msd(self, msd): """Verify if the Msd code is in the standard JOS set.""" - return msd.code in self.specifications.codes_map[msd.language] + code_map = self.specifications.codes_map[msd.language] + if msd.code in code_map: + return True + for msd_code in code_map: + if msd_code.startswith(msd.code): + return True + return False def check_valid_msd(self, msd, require_valid_flag): """If the Msd code is not valid, raise an exception or give a warning."""