From e7dad9436f612e0803bc445818e3452faeee503b Mon Sep 17 00:00:00 2001 From: Leo Hemsted Date: Thu, 18 Oct 2018 12:19:07 +0100 Subject: [PATCH] compare service id to UUID it doesn't match a string :weary: I couldn't think of a good way to test this in a unit test, since it involves changing the service id on all of the components of a service. --- app/celery/letters_pdf_tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/celery/letters_pdf_tasks.py b/app/celery/letters_pdf_tasks.py index 2891c68db..0cc6bc8f0 100644 --- a/app/celery/letters_pdf_tasks.py +++ b/app/celery/letters_pdf_tasks.py @@ -1,3 +1,4 @@ +from uuid import UUID import math from datetime import datetime @@ -187,7 +188,7 @@ 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 + if notification.service_id == UUID('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