Refactor: Change table chat_channel status data type. (#16061)

### What problem does this PR solve?

As title.

### Type of change

- [x] Refactoring
This commit is contained in:
Kevin Hu
2026-06-16 12:02:12 +08:00
committed by GitHub
parent a6f71e0e12
commit 5a817762fa
3 changed files with 5 additions and 5 deletions

View File

@@ -43,8 +43,7 @@ async def create_chat_channel():
"name": req["name"],
"channel": req["channel"],
"config": req["config"],
"dialog_id": req.get("dialog_id") or None,
"status": "1",
"dialog_id": req.get("dialog_id") or None
}
ChatChannelService.insert(**channel)
@@ -97,7 +96,7 @@ async def update_chat_channel(channel_id):
if dia.tenant_id != conn.tenant_id:
return _chat_channel_auth_error(channel_id, current_user.id)
update_fields = {fld: req[fld] for fld in ["name", "config", "dialog_id", "status"] if fld in req}
update_fields = {fld: req[fld] for fld in ["name", "config", "dialog_id"] if fld in req}
if update_fields:
ChatChannelService.update_by_id(channel_id, update_fields)