From 81182855a8de9f36edeae6ac0237c5e50edf6a6d Mon Sep 17 00:00:00 2001 From: Will Pearson Date: Fri, 17 Jul 2026 16:34:44 +0100 Subject: [PATCH] Check agreeement_signed is false rather than None If we don't do something like this we can get into a bad state. This is where they have signed the agreement and then someone sets them not to have signed the agreement (due to a change of government or similar) This sets agreement_signed to false but leaves agreement_signed_by_id, so it shows up in the UI as signed but still doesn't actually allow them to go live. This fixes that bug by checking things in able_to_agree. --- app/models/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/service.py b/app/models/service.py index ebcfa7594f..7da2ff3c6b 100644 --- a/app/models/service.py +++ b/app/models/service.py @@ -602,7 +602,7 @@ def api_keys(self): @property def able_to_accept_agreement(self): - return self.organisation.agreement_signed is not None or self.organisation_type in { + return self.organisation.agreement_signed is not False or self.organisation_type in { Organisation.TYPE_NHS_GP, Organisation.TYPE_NHS_LOCAL, }