Rename model

Reflects the new name of the feature.

Note that the name of the underlying table hasn’t changed because it’s
explicitly set to `service_whitelist`. Changing this will be a more
involved process.
This commit is contained in:
Chris Hill-Scott
2020-07-28 10:22:13 +01:00
parent 4d896aa642
commit 083573e4dc
9 changed files with 35 additions and 35 deletions

View File

@@ -40,7 +40,7 @@ from app.models import (
ServiceLetterContact,
ServicePermission,
ServiceSmsSender,
ServiceWhitelist,
ServiceGuestList,
Template,
User,
EMAIL_TYPE,
@@ -740,11 +740,11 @@ def create_ft_notification_status(
def create_service_whitelist(service, email_address=None, mobile_number=None):
if email_address:
whitelisted_user = ServiceWhitelist.from_string(service.id, EMAIL_TYPE, email_address)
whitelisted_user = ServiceGuestList.from_string(service.id, EMAIL_TYPE, email_address)
elif mobile_number:
whitelisted_user = ServiceWhitelist.from_string(service.id, MOBILE_TYPE, mobile_number)
whitelisted_user = ServiceGuestList.from_string(service.id, MOBILE_TYPE, mobile_number)
else:
whitelisted_user = ServiceWhitelist.from_string(service.id, EMAIL_TYPE, 'whitelisted_user@digital.gov.uk')
whitelisted_user = ServiceGuestList.from_string(service.id, EMAIL_TYPE, 'whitelisted_user@digital.gov.uk')
db.session.add(whitelisted_user)
db.session.commit()