Skip to content
Snippets Groups Projects
Unverified Commit 49bbdb3c authored by uvjustin's avatar uvjustin Committed by GitHub
Browse files

Use entry.data.get() in forked_daapd config_flow as some entries miss… (#37359)

parent e60b975b
No related branches found
No related tags found
No related merge requests found
...@@ -133,7 +133,7 @@ class ForkedDaapdFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): ...@@ -133,7 +133,7 @@ class ForkedDaapdFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
if user_input is not None: if user_input is not None:
# check for any entries with same host, abort if found # check for any entries with same host, abort if found
for entry in self._async_current_entries(): for entry in self._async_current_entries():
if entry.data[CONF_HOST] == user_input[CONF_HOST]: if entry.data.get(CONF_HOST) == user_input[CONF_HOST]:
return self.async_abort(reason="already_configured") return self.async_abort(reason="already_configured")
validate_result = await self.validate_input(user_input) validate_result = await self.validate_input(user_input)
if validate_result[0] == "ok": # success if validate_result[0] == "ok": # success
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment