From 98e8b16c34f1453772eaf3411561ee5c9ad82d40 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Fri, 11 Sep 2015 11:54:08 +0800 Subject: [PATCH] FIX: Broken BasicUserSerializer. --- app/serializers/basic_user_serializer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/serializers/basic_user_serializer.rb b/app/serializers/basic_user_serializer.rb index 12ed3f36397..2c72eb34221 100644 --- a/app/serializers/basic_user_serializer.rb +++ b/app/serializers/basic_user_serializer.rb @@ -9,7 +9,7 @@ class BasicUserSerializer < ApplicationSerializer if Hash === object User.avatar_template(user[:username], user[:uploaded_avatar_id]) else - object.avatar_template + user.try(:avatar_template) end end @@ -21,7 +21,7 @@ class BasicUserSerializer < ApplicationSerializer if Hash === object User.letter_avatar_color(user[:username]) else - object.letter_avatar_color + user.try(:letter_avatar_color) end end