From 0ca9f194d1dcd7342ba66bf69a1ee4a76120f97c Mon Sep 17 00:00:00 2001 From: zijiren <84728412+zijiren233@users.noreply.github.com> Date: Wed, 26 Feb 2025 11:15:55 +0800 Subject: [PATCH] fix: save empty key (#5411) --- service/aiproxy/model/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/aiproxy/model/channel.go b/service/aiproxy/model/channel.go index 938f25a7f10..1b30ecf1620 100644 --- a/service/aiproxy/model/channel.go +++ b/service/aiproxy/model/channel.go @@ -284,7 +284,7 @@ func UpdateChannel(channel *Channel) error { } result := DB. Model(channel). - Omit("used_amount", "request_count", "created_at", "balance_updated_at", "balance"). + Select("model_mapping", "key", "name", "base_url", "models", "status", "type", "priority", "config"). Clauses(clause.Returning{}). Where("id = ?", channel.ID). Updates(channel)