fix: midjourney channel auto ban

This commit is contained in:
CalciumIon 2024-07-06 01:44:30 +08:00
parent e0ed59bfe3
commit afe02c6aa5

View File

@ -544,7 +544,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 {
if channel.AutoBan != nil && *channel.AutoBan == 1 && common.AutomaticDisableChannelEnabled {
model.UpdateChannelStatusById(midjourneyTask.ChannelId, 2, "No available account instance")
}
}