Fix error handling when requesting profile image for bad user ID (#8618)

Этот коммит содержится в:
Joram Wilander
2018-04-13 10:57:22 -04:00
коммит произвёл Christopher Speller
родитель ae5e324be8
Коммит 21b1cd44e0
3 изменённых файлов: 9 добавлений и 1 удалений

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

@@ -199,7 +199,8 @@ func getProfileImage(c *Context, w http.ResponseWriter, r *http.Request) {
return
} else {
if len(users) == 0 {
c.Err = err
c.Err = model.NewAppError("getProfileImage", "api.user.get_profile_image.not_found.app_error", nil, "", http.StatusNotFound)
return
}
user := users[0]