Use "get_email_choices" directly in branding view

This commit is contained in:
Ben Thorner
2022-03-23 15:22:54 +00:00
parent b4b1c91fb9
commit 332c240b01
2 changed files with 5 additions and 6 deletions

View File

@@ -2200,13 +2200,10 @@ class ChooseEmailBrandingForm(ChooseBrandingForm):
def __init__(self, service):
super().__init__()
self.options.choices = tuple(self.get_available_choices(service))
@classmethod
def get_available_choices(cls, service):
return (
self.options.choices = tuple(
list(branding.get_email_choices(service)) +
[cls.FALLBACK_OPTION]
[self.FALLBACK_OPTION]
)