Skip to content

Commit

Permalink
fix: 修复渠道一致性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcium-Ion committed Jan 12, 2024
1 parent e2a1cab commit 2b3539f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/ability.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package model

import (
"errors"
"fmt"
"one-api/common"
"strings"
Expand Down Expand Up @@ -69,7 +70,7 @@ func GetRandomSatisfiedChannel(group string, model string) (*Channel, error) {
}
}
} else {
return nil, nil
return nil, errors.New("channel not found")
}
err = DB.First(&channel, "id = ?", channel.Id).Error
return &channel, err
Expand Down

0 comments on commit 2b3539f

Please sign in to comment.