mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
Debugging things is fun.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -155,7 +155,7 @@ class User(db.Model):
|
||||
|
||||
# either email auth or a mobile number must be provided
|
||||
CheckConstraint(
|
||||
"auth_type in ('email_auth', 'webauthn_auth') or mobile_number is not null"
|
||||
"auth_type in (AuthType.EMAIL, AuthType.WEBAUTHN) or mobile_number is not null"
|
||||
)
|
||||
|
||||
services = db.relationship("Service", secondary="user_to_service", backref="users")
|
||||
@@ -182,7 +182,7 @@ class User(db.Model):
|
||||
if self.platform_admin:
|
||||
return True
|
||||
|
||||
if self.auth_type == "webauthn_auth":
|
||||
if self.auth_type == AuthType.WEBAUTHN:
|
||||
return True
|
||||
|
||||
return any(
|
||||
|
||||
Reference in New Issue
Block a user