mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 18:31:13 -05:00
Add webauthn as an auth type.
Both in our models and as a migration to add it to auth_types table. Make sure that if we downgrade, we first clean up the data.
This commit is contained in:
@@ -75,9 +75,9 @@ def handle_integrity_error(exc):
|
||||
"""
|
||||
Handle integrity errors caused by the auth type/mobile number check constraint
|
||||
"""
|
||||
if 'ck_users_mobile_or_email_auth' in str(exc):
|
||||
if 'ck_user_has_mobile_or_other_auth' in str(exc):
|
||||
# we don't expect this to trip, so still log error
|
||||
current_app.logger.exception('Check constraint ck_users_mobile_or_email_auth triggered')
|
||||
current_app.logger.exception('Check constraint ck_user_has_mobile_or_other_auth triggered')
|
||||
return jsonify(result='error', message='Mobile number must be set if auth_type is set to sms_auth'), 400
|
||||
|
||||
raise exc
|
||||
|
||||
Reference in New Issue
Block a user