Don't log address redaction failure when letter sent with test key

This commit is contained in:
Pea Tyczynska
2019-09-17 15:55:26 +01:00
parent 99eb17fc29
commit 1279a46b8b
2 changed files with 8 additions and 5 deletions

View File

@@ -228,7 +228,7 @@ def process_virus_scan_passed(self, filename):
new_pdf = sanitise_response.content
redaction_failed_message = sanitise_response.get("redaction_failed_message")
if redaction_failed_message:
if redaction_failed_message and not is_test_key:
current_app.logger.info('{} for notification id {} ({})'.format(
redaction_failed_message, notification.id, filename)
)