Debugging things is fun.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-29 16:04:22 -05:00
parent 8907edc194
commit e64e500561
9 changed files with 37 additions and 18 deletions

View File

@@ -62,9 +62,10 @@ def delete_webauthn_credential(user_id, webauthn_credential_id):
user = get_user_by_id(user_id)
if len(user.webauthn_credentials) == 1:
# TODO: Only raise an error if user has auth type webauthn_auth
# TODO: Only raise an error if user has auth type AuthType.WEBAUTHN
raise InvalidRequest(
"Cannot delete last remaining webauthn credential for user", status_code=400
"Cannot delete last remaining webauthn credential for user",
status_code=400,
)
dao_delete_webauthn_credential(webauthn_credential)