From 182664292ea36faf1af0c1c0a606bafd4988fa00 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 21 Aug 2025 12:35:03 -0700 Subject: [PATCH] fix email check --- app/dao/users_dao.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/dao/users_dao.py b/app/dao/users_dao.py index 003aaece0..c60252283 100644 --- a/app/dao/users_dao.py +++ b/app/dao/users_dao.py @@ -54,6 +54,11 @@ def get_login_gov_user(login_uuid, email_address): return user + # Handle the case of the brand new user. We know their email from the + # invitation but need to related the login_uuid to it. + stmt = select(User).where(User.email_address.ilike(email_address)) + user = db.session.execute(stmt).scalars().first() + if user: save_user_attribute(user, {"login_uuid": login_uuid}) return user