* Migration completed

* Fix tests

* Fix tests

* Fix tests

* Suggestions

* Trigger CI

* Suggestions

* Merge with master

* Trigger CI

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Этот коммит содержится в:
Rodrigo Villablanca
2020-10-26 06:41:27 -03:00
коммит произвёл GitHub
родитель d51d843fcd
Коммит 96f1739f8f
55 изменённых файлов: 2487 добавлений и 1568 удалений

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

@@ -187,7 +187,7 @@ func (a *App) exportAllUsers(writer io.Writer) *model.AppError {
users, err := a.Srv().Store.User().GetAllAfter(1000, afterId)
if err != nil {
return err
return model.NewAppError("exportAllUsers", "app.user.get.app_error", nil, err.Error(), http.StatusInternalServerError)
}
if len(users) == 0 {
@@ -412,11 +412,12 @@ func (a *App) BuildPostReactions(postId string) (*[]ReactionImportData, *model.A
for _, reaction := range reactions {
user, err := a.Srv().Store.User().Get(reaction.UserId)
if err != nil {
if err.Id == store.MISSING_ACCOUNT_ERROR { // this is a valid case, the user that reacted might've been deleted by now
var nfErr *store.ErrNotFound
if errors.As(err, &nfErr) { // this is a valid case, the user that reacted might've been deleted by now
mlog.Info("Skipping reactions by user since the entity doesn't exist anymore", mlog.String("user_id", reaction.UserId))
continue
}
return nil, err
return nil, model.NewAppError("BuildPostReactions", "app.user.get.app_error", nil, err.Error(), http.StatusInternalServerError)
}
reactionsOfPost = append(reactionsOfPost, *ImportReactionFromPost(user, reaction))
}