From 9606513e1f0a19bf16d282353cd9b555a038a42d Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Mon, 15 Oct 2018 16:07:22 +0100 Subject: [PATCH] exclude CYSP from sanitise we know their content is already good, but they slightly exceed the margins. Until they deploy their fixed template, lets not valiate them --- app/celery/letters_pdf_tasks.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/celery/letters_pdf_tasks.py b/app/celery/letters_pdf_tasks.py index f776383a4..c3a47608d 100644 --- a/app/celery/letters_pdf_tasks.py +++ b/app/celery/letters_pdf_tasks.py @@ -187,6 +187,11 @@ def process_virus_scan_passed(self, filename): new_pdf = _sanitise_precomiled_pdf(self, notification, old_pdf) + # TODO: Remove this once CYSP update their template to not cross over the margins + if notification.service_id == 'fe44178f-3b45-4625-9f85-2264a36dd9ec': # CYSP + # Check your state pension submit letters with good addresses and notify tags, so just use their supplied pdf + new_pdf = old_pdf + if not new_pdf: current_app.logger.info('Invalid precompiled pdf received {} ({})'.format(notification.id, filename)) update_notification_status_by_id(notification.id, NOTIFICATION_VALIDATION_FAILED)