mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 23:41:48 -05:00
Fix Spotify reauth crash when config entry data lacks "id" (#182290)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
258fb3e117
commit
100c365aa9
@@ -75,7 +75,7 @@ class SpotifyFlowHandler(
|
||||
if user_input is None:
|
||||
return self.async_show_form(
|
||||
step_id="reauth_confirm",
|
||||
description_placeholders={"account": reauth_entry.data["id"]},
|
||||
description_placeholders={"account": reauth_entry.title},
|
||||
errors={},
|
||||
)
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ def mock_config_entry(expires_at: int) -> MockConfigEntry:
|
||||
"expires_at": expires_at,
|
||||
"scope": SCOPES,
|
||||
},
|
||||
"id": "1112264111",
|
||||
"name": "spotify_account_1",
|
||||
},
|
||||
entry_id="01J5TX5A0FF6G5V0QJX6HBC94T",
|
||||
|
||||
@@ -204,6 +204,7 @@ async def test_reauthentication(
|
||||
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "reauth_confirm"
|
||||
assert result["description_placeholders"]["account"] == "spotify_1"
|
||||
|
||||
result = await hass.config_entries.flow.async_configure(result["flow_id"], {})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user