diff --git a/ci/bootstrap_create_accounts.py b/ci/bootstrap_create_accounts.py index 768c2df6669..22c2c5e3d9b 100644 --- a/ci/bootstrap_create_accounts.py +++ b/ci/bootstrap_create_accounts.py @@ -33,6 +33,13 @@ async def insert(tx: Transaction) -> Optional[int]: if row: if row['state'] == 'active': return None + if row['state'] == 'inactive': + # Inactive users don't need recreating, but we should reactivate before we move on + await tx.execute_update( + 'UPDATE users SET state = "active", last_activated = CURRENT_TIMESTAMP(3) WHERE id = %s;', + (row['id'],), + ) + return None return row['id'] hail_credentials_secret_name = f'{username}-gsa-key'