PLT-7092 Fixed creation of PostList with null Posts fields (#6924)

Этот коммит содержится в:
Harrison Healey
2017-07-13 08:12:11 -04:00
коммит произвёл Joram Wilander
родитель 9a654d7b27
Коммит 4eed88e0c2
3 изменённых файлов: 4 добавлений и 6 удалений

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

@@ -602,16 +602,15 @@ func getMyChannelMembers(c *Context, w http.ResponseWriter, r *http.Request) {
func getPinnedPosts(c *Context, w http.ResponseWriter, r *http.Request) {
params := mux.Vars(r)
channelId := params["channel_id"]
posts := &model.PostList{}
if result := <-app.Srv.Store.Channel().GetPinnedPosts(channelId); result.Err != nil {
c.Err = result.Err
return
} else {
posts = result.Data.(*model.PostList)
posts := result.Data.(*model.PostList)
w.Write([]byte(posts.ToJson()))
}
w.Write([]byte(posts.ToJson()))
}
func addMember(c *Context, w http.ResponseWriter, r *http.Request) {