MM-30917 Fix invalid reply count calculation during thread migration (#16395)

Этот коммит содержится в:
Eli Yukelzon
2020-11-26 10:41:29 +02:00
коммит произвёл GitHub
родитель 9b6ee63a1e
Коммит 1e15ad0686

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

@@ -1980,7 +1980,7 @@ func (s *SqlPostStore) updateThreadsFromPosts(transaction *gorp.Transaction, pos
return err
}
// calculate reply count
count, err := transaction.SelectInt("SELECT COUNT(Id) FROM Posts WHERE RootId=:RootId", map[string]interface{}{"RootId": rootId})
count, err := transaction.SelectInt("SELECT COUNT(Id) FROM Posts WHERE RootId=:RootId And DeleteAt=0", map[string]interface{}{"RootId": rootId})
if err != nil {
return err
}