remove email branding

This commit is contained in:
stvnrlly
2023-12-18 16:10:12 -05:00
parent 1b55e1f09a
commit f600dd95d6
57 changed files with 37 additions and 3970 deletions

View File

@@ -66,9 +66,6 @@ class ServiceEvent(Event):
def format_contact_link(self):
return "Set the contact details for this service to {}".format(self.value_to)
def format_email_branding(self):
return "Updated this services email branding"
def format_inbound_api(self):
return "Updated the callback for received text messages"

View File

@@ -3,7 +3,6 @@ from collections import OrderedDict
from werkzeug.utils import cached_property
from app.models import JSONModel, ModelList, SerialisedModelCollection, SortByNameMixin
from app.notify_client.email_branding_client import email_branding_client
from app.notify_client.organizations_api_client import organizations_client
@@ -25,7 +24,6 @@ class Organization(JSONModel, SortByNameMixin):
"name",
"active",
"organization_type",
"email_branding_id",
"domains",
"request_to_go_live_notes",
"count_of_live_services",
@@ -74,7 +72,6 @@ class Organization(JSONModel, SortByNameMixin):
self.domains = []
self.organization_type = None
self.request_to_go_live_notes = None
self.email_branding_id = None
@property
def organization_type_label(self):
@@ -128,19 +125,6 @@ class Organization(JSONModel, SortByNameMixin):
key=lambda user: user.email_address.lower(),
)
@cached_property
def email_branding(self):
if self.email_branding_id:
return email_branding_client.get_email_branding(self.email_branding_id)[
"email_branding"
]
@property
def email_branding_name(self):
if self.email_branding_id:
return self.email_branding["name"]
return "GOV.UK"
def update(self, delete_services_cache=False, **kwargs):
response = organizations_client.update_organization(
self.id,

View File

@@ -8,7 +8,6 @@ from app.models.organization import Organization
from app.models.user import InvitedUsers, User, Users
from app.notify_client.api_key_api_client import api_key_api_client
from app.notify_client.billing_api_client import billing_api_client
from app.notify_client.email_branding_client import email_branding_client
from app.notify_client.inbound_number_client import inbound_number_client
from app.notify_client.invite_api_client import invite_api_client
from app.notify_client.job_api_client import job_api_client
@@ -408,31 +407,6 @@ class Service(JSONModel, SortByNameMixin):
{},
).get("days_of_retention", current_app.config["ACTIVITY_STATS_LIMIT_DAYS"])
@property
def email_branding_id(self):
return self._dict["email_branding"]
@cached_property
def email_branding(self):
if self.email_branding_id:
return email_branding_client.get_email_branding(self.email_branding_id)[
"email_branding"
]
return None
@cached_property
def email_branding_name(self):
if self.email_branding is None:
return "GOV.UK"
return self.email_branding["name"]
@property
def needs_to_change_email_branding(self):
return (
self.email_branding_id is None
and self.organization_type != Organization.TYPE_CENTRAL
)
@cached_property
def organization(self):
return Organization.from_id(self.organization_id)