From 631c3478ae6727d4f13847755deb558c3d56e76d Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Fri, 31 Aug 2018 10:32:26 +0100 Subject: [PATCH] Remove `branding` attribute from service model MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To correspond with us dropping this column from the database. Remove the attribute from the model gives us more confidence that it’s not being used (because it will raise exceptions in any tests that refer to it). --- app/notify_client/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/notify_client/models.py b/app/notify_client/models.py index 87a977a8a..10a5eefad 100644 --- a/app/notify_client/models.py +++ b/app/notify_client/models.py @@ -270,7 +270,6 @@ class Service(dict): ALLOWED_PROPERTIES = { 'active', - 'branding', 'dvla_organisation', 'email_branding', 'email_from', @@ -293,7 +292,7 @@ class Service(dict): def __getattr__(self, attr): if attr in self.ALLOWED_PROPERTIES: return self[attr] - raise AttributeError + raise AttributeError('`{}` is not a service attribute'.format(attr)) @property def trial_mode(self):