chore: 优化自动禁用代码

This commit is contained in:
CalciumIon
2024-08-03 17:32:28 +08:00
parent 421d34b3b7
commit a1284e4a58
5 changed files with 23 additions and 14 deletions
+1 -1
View File
@@ -549,7 +549,7 @@ func RelayMidjourneySubmit(c *gin.Context, relayMode int) *dto.MidjourneyRespons
if err != nil {
common.SysError("get_channel_null: " + err.Error())
}
if channel.AutoBan != nil && *channel.AutoBan == 1 && common.AutomaticDisableChannelEnabled {
if channel.GetAutoBan() && common.AutomaticDisableChannelEnabled {
model.UpdateChannelStatusById(midjourneyTask.ChannelId, 2, "No available account instance")
}
}