mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Only show contact lists relevant to template
You can’t send an email message template to a list of phone numbers. So we shouldn’t show you the lists of phone numbers when you’ve chosen an email template.
This commit is contained in:
@@ -125,5 +125,13 @@ class ContactList(JSONModel):
|
||||
|
||||
|
||||
class ContactLists(ModelList):
|
||||
|
||||
client_method = contact_list_api_client.get_contact_lists
|
||||
model = ContactList
|
||||
|
||||
def __init__(self, service_id, template_type=None):
|
||||
super().__init__(service_id)
|
||||
self.items = [
|
||||
item for item in self.items
|
||||
if template_type in {item['template_type'], None}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user