From e26944c50c5de44483a7bc011a980d144650c220 Mon Sep 17 00:00:00 2001 From: vladd-bit Date: Wed, 6 Dec 2023 14:42:58 +0000 Subject: [PATCH] NiFi: typo anon doc script fix. --- nifi/user-scripts/anonymise_doc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi/user-scripts/anonymise_doc.py b/nifi/user-scripts/anonymise_doc.py index af028e40..6179e8b3 100644 --- a/nifi/user-scripts/anonymise_doc.py +++ b/nifi/user-scripts/anonymise_doc.py @@ -41,10 +41,10 @@ def special_deid(cat, text, record): text_field = record[text_field_name] _anon_text = "" if len(text_field) > char_limit: - sections = int(len(text_field_name) / char_limit) + sections = int(len(text_field) / char_limit) for i in range(sections): - _tmp_text = text_field[i * char_limit: (i + 1) * char_limit] + _tmp_text = text_field[i * char_limit:(i + 1) * char_limit] _anon_text += deid_text(cat, _tmp_text) else: _anon_text = deid_text(cat, text_field)