This commit is contained in:
G Johansson
2025-08-16 16:05:23 +00:00
parent e8d5cb2acb
commit 8a2866fbfe

View File

@@ -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,