Skip to content
Snippets Groups Projects
Commit 1809724f authored by Paweł Walkowiak's avatar Paweł Walkowiak
Browse files

Add if

parent b4d3bcf8
1 merge request!13Fix anonymizer errors
Pipeline #15181 passed with stages
in 1 minute and 35 seconds
......@@ -95,11 +95,12 @@ class DateReplacer(ReplacerInterface):
month_name = months_map[random_month]
replacement.append(month_name)
elif entry[0] == DateDetection.AnnotationPart.OTHER:
replacement.append(entry[1])
if entry[1] is not None:
replacement.append(entry[1])
else:
raise ValueError(f"Unknown format entry: {entry}")
_log.debug(f"entry {entry} replacement: {replacement[-1]}")
_log.debug(f"replacement: {replacement}")
replacement = "".join(replacement)
already_replaced[text[start:end]] = replacement
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment