backend/utils/config_utils.py:150-165:
def update_single_config(self, tenant_id: str | None = None, key: str | None = None):
"""Update configuration value in database"""
if tenant_id is None:
logger.warning(...)
return
existing_config = get_single_config_info(tenant_id, key)
if existing_config:
update_data = {
"updated_by": tenant_id,
"update_time": func.current_timestamp()
}
update_config_by_tenant_config_id_and_data(
existing_config["tenant_config_id"], update_data)
return
The signature accepts tenant_id and key but no value. The function looks up the existing row and writes back only updated_by + update_time. The actual config_value column is untouched. Calling this method to "update" a config in fact does nothing observable from the API surface — just touches the audit metadata.
Compare with set_single_config directly above (lines 115-135) which does the same key plus a real config_value. That's the body the update method appears to want.
Either:
- The intended signature should include
value, and the body should pass "config_value": value into update_data — in which case this is dead/broken code with a misleading name; or
- The method is genuinely meant to be a "touch" / re-stamp helper and should be renamed
touch_single_config to make the contract honest.
A grep of the codebase reveals no caller using update_single_config, suggesting nobody noticed because nobody invokes it — which is its own smell.
Severity: Low (no user-visible breakage today), but high confusion risk for the next contributor.
backend/utils/config_utils.py:150-165:The signature accepts
tenant_idandkeybut no value. The function looks up the existing row and writes back onlyupdated_by+update_time. The actualconfig_valuecolumn is untouched. Calling this method to "update" a config in fact does nothing observable from the API surface — just touches the audit metadata.Compare with
set_single_configdirectly above (lines 115-135) which does the same key plus a realconfig_value. That's the body the update method appears to want.Either:
value, and the body should pass"config_value": valueintoupdate_data— in which case this is dead/broken code with a misleading name; ortouch_single_configto make the contract honest.A grep of the codebase reveals no caller using
update_single_config, suggesting nobody noticed because nobody invokes it — which is its own smell.Severity: Low (no user-visible breakage today), but high confusion risk for the next contributor.