PLT-4822 fixing max channels per team (#4675)

Этот коммит содержится в:
Corey Hulen
2016-11-30 04:48:32 -08:00
коммит произвёл Joram Wilander
родитель e7710cf1d2
Коммит d86cdc3f91

Просмотреть файл

@@ -196,7 +196,7 @@ func (s SqlChannelStore) saveChannelT(transaction *gorp.Transaction, channel *mo
if count, err := transaction.SelectInt("SELECT COUNT(0) FROM Channels WHERE TeamId = :TeamId AND DeleteAt = 0 AND (Type = 'O' OR Type = 'P')", map[string]interface{}{"TeamId": channel.TeamId}); err != nil {
result.Err = model.NewLocAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.current_count.app_error", nil, "teamId="+channel.TeamId+", "+err.Error())
return result
} else if count > 20000 {
} else if count > *utils.Cfg.TeamSettings.MaxChannelsPerTeam {
result.Err = model.NewLocAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.limit.app_error", nil, "teamId="+channel.TeamId)
return result
}