Fix error checking when setting profile image (#9977)

Этот коммит содержится в:
Joram Wilander
2018-12-10 13:44:47 -05:00
коммит произвёл Carlos Tadeu Panato Junior
родитель 8374b6221e
Коммит a84eb6505f

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

@@ -850,8 +850,8 @@ func (a *App) SetProfileImageFromFile(userId string, file io.Reader) *model.AppE
a.InvalidateCacheForUser(userId)
user, err := a.GetUser(userId)
if err != nil {
user, userErr := a.GetUser(userId)
if userErr != nil {
mlog.Error(fmt.Sprintf("Error in getting users profile for id=%v forcing logout", userId), mlog.String("user_id", userId))
return nil
}