Commit adbb6830 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'sh-speed-geo-avatar' into 'master'

Check whether Geo is enabled before checking whether avatar exists

See merge request !1557
parents 90c1f1f2 b0b7c008
......@@ -5,7 +5,7 @@ module EE
# and be **prepended** in the `Group`, `User`, `Project` models
module GeoAwareAvatar
def avatar_url(size = nil, scale = 2)
if self[:avatar].present? && ::Gitlab::Geo.secondary?
if ::Gitlab::Geo.secondary? && self[:avatar].present?
File.join(::Gitlab::Geo.primary_node.url, avatar.url)
else
super
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment