From ef665607446d98fde205903464be5f2a16eaa53a Mon Sep 17 00:00:00 2001 From: Jan-Philipp Benecke Date: Thu, 22 Feb 2024 16:11:46 +0100 Subject: [PATCH] Use async_update_reload_and_abort helper in discord (#111104) --- homeassistant/components/discord/config_flow.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/homeassistant/components/discord/config_flow.py b/homeassistant/components/discord/config_flow.py index b28c55b022f..14c2cc6c040 100644 --- a/homeassistant/components/discord/config_flow.py +++ b/homeassistant/components/discord/config_flow.py @@ -36,11 +36,9 @@ class DiscordFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): if user_input: error, info = await _async_try_connect(user_input[CONF_API_TOKEN]) if info and (entry := await self.async_set_unique_id(str(info.id))): - self.hass.config_entries.async_update_entry( + return self.async_update_reload_and_abort( entry, data=entry.data | user_input ) - await self.hass.config_entries.async_reload(entry.entry_id) - return self.async_abort(reason="reauth_successful") if error: errors["base"] = error