diff --git a/mrz/special_cases/checker/id_card_belgium.py b/mrz/special_cases/checker/id_card_belgium.py index b835299..e62f870 100755 --- a/mrz/special_cases/checker/id_card_belgium.py +++ b/mrz/special_cases/checker/id_card_belgium.py @@ -19,4 +19,6 @@ def document_number_hash(self) -> bool: doc_number_fin = self._optional_data.rstrip("<") self._document_number = self._document_number + "<" + doc_number_fin[:-1] self._document_number_hash = doc_number_fin[-1] + if not hash_is_ok(self._document_number, self._document_number_hash): + self._document_number = self._document_number.replace("<","") return self.report.add("document number hash", hash_is_ok(self._document_number, self._document_number_hash))