mirror of
https://github.com/GSA/notifications-admin.git
synced 2025-12-15 17:44:03 -05:00
Remove default from format_auth_type
I think it’s better to raise an exception and force us to fix it if we ever add a new auth_type, or use this formatter on something that isn’t a valid auth_type. Co-authored-by: Ben Thorner <benthorner@users.noreply.github.com>
This commit is contained in:
@@ -535,7 +535,7 @@ def format_auth_type(auth_type, with_indefinite_article=False):
|
||||
'email_auth': ('an', 'Email link'),
|
||||
'sms_auth': ('a', 'Text message code'),
|
||||
'webauthn_auth': ('a', 'Security key'),
|
||||
}.get(auth_type, ('a', auth_type))
|
||||
}[auth_type]
|
||||
|
||||
if with_indefinite_article:
|
||||
return f'{indefinite_article} {auth_type.lower()}'
|
||||
|
||||
Reference in New Issue
Block a user