PLT-6488: Reduce database queries in user bulk import. (#6371)

Этот коммит содержится в:
George Goldberg
2017-05-10 14:08:06 +01:00
коммит произвёл Christopher Speller
родитель 7a927c03e4
Коммит a678981861
3 изменённых файлов: 95 добавлений и 42 удалений

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

@@ -286,10 +286,6 @@ func joinUserToTeam(team *model.Team, user *model.User) (bool, *model.AppError)
}
}
if uua := <-Srv.Store.User().UpdateUpdateAt(user.Id); uua.Err != nil {
return false, uua.Err
}
return false, nil
}
@@ -300,6 +296,10 @@ func JoinUserToTeam(team *model.Team, user *model.User, userRequestorId string)
return nil
}
if uua := <-Srv.Store.User().UpdateUpdateAt(user.Id); uua.Err != nil {
return uua.Err
}
channelRole := model.ROLE_CHANNEL_USER.Id
if team.Email == user.Email {