Fix: init func (#13430)

### What problem does this PR solve?

Fix update_cnt add error in init_data.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Lynn
2026-03-06 11:42:31 +08:00
committed by GitHub
parent 6849d35bf5
commit 0214257886
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class LLM(ComponentBase):
def __init__(self, canvas, component_id, param: ComponentParamBase):
super().__init__(canvas, component_id, param)
chat_model_config = get_model_config_by_type_and_name(self._canvas.get_tenant_id(), TenantLLMService.llm_id2llm_type(self._param.llm_id))
chat_model_config = get_model_config_by_type_and_name(self._canvas.get_tenant_id(), TenantLLMService.llm_id2llm_type(self._param.llm_id), self._param.llm_id)
self.chat_mdl = LLMBundle(self._canvas.get_tenant_id(), chat_model_config,
max_retries=self._param.max_retries,
retry_interval=self._param.delay_after_error)

View File

@ -314,7 +314,7 @@ def fix_empty_tenant_model_id():
if tenant_model:
update_dict.update({f"tenant_{key}": tenant_model.id})
if update_dict:
update_dict += TenantService.update_by_id(tenant_dict["id"], update_dict)
update_cnt += TenantService.update_by_id(tenant_dict["id"], update_dict)
logging.info(f"Update {update_cnt} tenant_model_id in table tenant.")
logging.info("Fix empty tenant_model_id done.")