Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Claudio Costa
2020-08-21 18:38:14 +02:00
коммит произвёл GitHub
родитель 6a50106cd9
Коммит e6c1d5f75b
2 изменённых файлов: 20 добавлений и 1 удалений

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

@@ -2644,7 +2644,7 @@ func (a *App) createInitialSidebarCategories(userId, teamId string) *model.AppEr
func (a *App) GetSidebarCategories(userId, teamId string) (*model.OrderedSidebarCategories, *model.AppError) {
categories, err := a.Srv().Store.Channel().GetSidebarCategories(userId, teamId)
if len(categories.Categories) == 0 && err == nil {
if err == nil && len(categories.Categories) == 0 {
// A user must always have categories, so migration must not have happened yet, and we should run it ourselves
nErr := a.createInitialSidebarCategories(userId, teamId)
if nErr != nil {