mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
FIX: Do not schedule avatar download if image is '' (#27687)
This commit is contained in:
@ -148,7 +148,7 @@ class Auth::ManagedAuthenticator < Auth::Authenticator
|
||||
end
|
||||
|
||||
def retrieve_avatar(user, url)
|
||||
return unless user && url
|
||||
return unless user && url.present?
|
||||
return if user.user_avatar.try(:custom_upload_id).present?
|
||||
Jobs.enqueue(:download_avatar_from_url, url: url, user_id: user.id, override_gravatar: false)
|
||||
end
|
||||
|
Reference in New Issue
Block a user