From 209ed105f9f1d228302f4e60607cba2ff95995ec Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Mon, 20 Aug 2018 18:21:40 +0200 Subject: [PATCH] FIX: User profiles didn't work when API keys exist --- app/serializers/user_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/user_serializer.rb b/app/serializers/user_serializer.rb index cb183a2a7f0..ba43aaff5da 100644 --- a/app/serializers/user_serializer.rb +++ b/app/serializers/user_serializer.rb @@ -189,7 +189,7 @@ class UserSerializer < BasicUserSerializer } end - keys.sort! { |a, b| a.last_used_at.to_time > b.last_used_at.to_time } + keys.sort! { |a, b| a[:last_used_at].to_time > b[:last_used_at].to_time } keys.length > 0 ? keys : nil end