From 4e2cc9caf0472ab5f3674556fddbf65eabb2fb3f Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 3 Dec 2018 17:28:21 +0000 Subject: [PATCH] FIX: Use safe navigation operator when looking for avatar URL --- lib/auth/managed_authenticator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/managed_authenticator.rb b/lib/auth/managed_authenticator.rb index 590efaacfe4..9df6151f787 100644 --- a/lib/auth/managed_authenticator.rb +++ b/lib/auth/managed_authenticator.rb @@ -94,7 +94,7 @@ class Auth::ManagedAuthenticator < Auth::Authenticator def after_create_account(user, auth) data = auth[:extra_data] create_association!(data.merge(user: user)) - retrieve_avatar(user, data["info"]["image"]) + retrieve_avatar(user, data&.[]("info")&.[]("image")) end def retrieve_avatar(user, url)