diff --git a/auth/auth/driver/driver.py b/auth/auth/driver/driver.py index fb5a698a3ad..daa6a4ebe9d 100644 --- a/auth/auth/driver/driver.py +++ b/auth/auth/driver/driver.py @@ -547,7 +547,10 @@ async def update_users(app): await delete_user(app, user) users_without_hail_identity_uid = [ - x async for x in db.execute_and_fetchall('SELECT * FROM users WHERE hail_identity_uid IS NULL') + x + async for x in db.execute_and_fetchall( + "SELECT * FROM users WHERE state = 'active' AND hail_identity_uid IS NULL" + ) ] for user in users_without_hail_identity_uid: await resolve_identity_uid(app, user['hail_identity'])