mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 18:01:31 +02:00
Fix
This commit is contained in:
@@ -234,9 +234,12 @@ class SQLConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
_LOGGER.debug("Invalid query: %s", err)
|
_LOGGER.debug("Invalid query: %s", err)
|
||||||
errors["query"] = "query_invalid"
|
errors["query"] = "query_invalid"
|
||||||
|
|
||||||
for k, v in user_input[CONF_ADVANCED_OPTIONS].items():
|
mod_advanced_options = {
|
||||||
if not v:
|
k: v
|
||||||
user_input[CONF_ADVANCED_OPTIONS].pop(k)
|
for k, v in user_input[CONF_ADVANCED_OPTIONS].items()
|
||||||
|
if v is not None
|
||||||
|
}
|
||||||
|
user_input[CONF_ADVANCED_OPTIONS] = mod_advanced_options
|
||||||
|
|
||||||
if not errors:
|
if not errors:
|
||||||
name = self.data[CONF_NAME]
|
name = self.data[CONF_NAME]
|
||||||
@@ -297,9 +300,12 @@ class SQLOptionsFlowHandler(OptionsFlowWithReload):
|
|||||||
recorder_db,
|
recorder_db,
|
||||||
)
|
)
|
||||||
|
|
||||||
for k, v in user_input[CONF_ADVANCED_OPTIONS].items():
|
mod_advanced_options = {
|
||||||
if not v:
|
k: v
|
||||||
user_input[CONF_ADVANCED_OPTIONS].pop(k)
|
for k, v in user_input[CONF_ADVANCED_OPTIONS].items()
|
||||||
|
if v is not None
|
||||||
|
}
|
||||||
|
user_input[CONF_ADVANCED_OPTIONS] = mod_advanced_options
|
||||||
|
|
||||||
return self.async_create_entry(
|
return self.async_create_entry(
|
||||||
data=user_input,
|
data=user_input,
|
||||||
|
Reference in New Issue
Block a user