Commit 9c8732cb by CaIon

fix: 修复渠道一致性问题

parent 0266cf4b
package model package model
import ( import (
"errors"
"fmt" "fmt"
"one-api/common" "one-api/common"
"strings" "strings"
...@@ -69,7 +70,7 @@ func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) { ...@@ -69,7 +70,7 @@ func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
} }
} }
} else { } else {
return nil, nil return nil, errors.New("channel not found")
} }
err = DB.First(&channel, "id = ?", channel.Id).Error err = DB.First(&channel, "id = ?", channel.Id).Error
return &channel, err return &channel, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment