fix deactivate

This commit is contained in:
Kenneth Kehl
2025-08-15 08:31:36 -07:00
parent 748c35d2df
commit a48269d210
2 changed files with 3 additions and 2 deletions

View File

@@ -147,7 +147,9 @@ def _do_login_dot_gov(): # $ pragma: no cover
usr = User.from_email_address(user["email_address"])
current_app.logger.info(f"activating user {usr.id} #notify-admin-1505")
activate_user(usr.id)
# New users on the invite path need activation
if not usr.is_active:
activate_user(usr.id)
except BaseException as be: # noqa B036
current_app.logger.error(f"Error signing in: {be} #notify-admin-1505 ")
error(401)

View File

@@ -27,7 +27,6 @@ def _sign_out_at_login_dot_gov():
def sign_out():
if current_user.is_authenticated:
current_user.deactivate()
session.clear()
current_user.sign_out()