mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Adding cmd line options
This commit is contained in:
@@ -35,6 +35,10 @@ func (s SqlTeamStore) CreateIndexesIfNotExists() {
|
||||
}
|
||||
|
||||
func (s SqlTeamStore) Save(team *model.Team) StoreChannel {
|
||||
return s.SaveWithValidate(team, true)
|
||||
}
|
||||
|
||||
func (s SqlTeamStore) SaveWithValidate(team *model.Team, validate bool) StoreChannel {
|
||||
storeChannel := make(StoreChannel)
|
||||
|
||||
go func() {
|
||||
@@ -49,10 +53,13 @@ func (s SqlTeamStore) Save(team *model.Team) StoreChannel {
|
||||
}
|
||||
|
||||
team.PreSave()
|
||||
if result.Err = team.IsValid(); result.Err != nil {
|
||||
storeChannel <- result
|
||||
close(storeChannel)
|
||||
return
|
||||
|
||||
if validate {
|
||||
if result.Err = team.IsValid(); result.Err != nil {
|
||||
storeChannel <- result
|
||||
close(storeChannel)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if err := s.GetMaster().Insert(team); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user