Skip to content

Commit 09afb19

Browse files
committed
fix user with no email
1 parent c5663e9 commit 09afb19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

business_objects/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get(user_id: str) -> User:
1616

1717
def get_user_cached_if_not_admin(user_id: str) -> Optional[User]:
1818
user = get_user_cached(user_id)
19-
if user.email.endswith("@kern.ai") and user.verified:
19+
if (user.email or "").endswith("@kern.ai") and user.verified:
2020
# for admins this could result in two db requests shortly after each other
2121
# but it's better than having the jumping users without the correct org id
2222
return get(user_id)

0 commit comments

Comments
 (0)