From bb8828c86f2c559d3cec734f8be665bc326aae33 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Thu, 25 Jan 2024 18:15:35 +0100 Subject: [PATCH] Address late review on auth (#108852) --- homeassistant/auth/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/auth/__init__.py b/homeassistant/auth/__init__.py index 15094681454..f99e90dbc05 100644 --- a/homeassistant/auth/__init__.py +++ b/homeassistant/auth/__init__.py @@ -514,7 +514,7 @@ class AuthManager: def _async_remove_expired_refresh_tokens(self, _: datetime | None = None) -> None: """Remove expired refresh tokens.""" now = time.time() - for token in self._store.async_get_refresh_tokens()[:]: + for token in self._store.async_get_refresh_tokens(): if (expire_at := token.expire_at) is not None and expire_at <= now: self.async_remove_refresh_token(token) self._async_track_next_refresh_token_expiration()