don't check for avatar service enabled unless needed
improves performance on user_json closes #CNVS-25270 Change-Id: Ib18d8570dabb3aa7f50571280ab93c269b0adb21 Reviewed-on: https://gerrit.instructure.com/67691 Reviewed-by: Jeremy Stanley <jeremy@instructure.com> Tested-by: Jenkins Product-Review: James Williams <jamesw@instructure.com> QA-Review: James Williams <jamesw@instructure.com>
This commit is contained in:
parent
f9e34b77e9
commit
aa9af7c96a
|
@ -60,7 +60,7 @@ module Api::V1::User
|
||||||
json[:login_id] = pseudonym.unique_id
|
json[:login_id] = pseudonym.unique_id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if user.account.service_enabled?(:avatars) && includes.include?('avatar_url')
|
if includes.include?('avatar_url') && user.account.service_enabled?(:avatars)
|
||||||
json[:avatar_url] = avatar_url_for_user(user, blank_fallback)
|
json[:avatar_url] = avatar_url_for_user(user, blank_fallback)
|
||||||
end
|
end
|
||||||
if enrollments
|
if enrollments
|
||||||
|
|
Loading…
Reference in New Issue