diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/group.rb | 2 | ||||
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | app/models/user.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index a8be7004ee8..37631b99701 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -90,7 +90,7 @@ class Group < Namespace end def avatar_url(size = nil) - if avatar.present? + if self[:avatar].present? [gitlab_config.url, avatar.url].join end end diff --git a/app/models/project.rb b/app/models/project.rb index ae96f00a705..e5fae15cb19 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -701,7 +701,7 @@ class Project < ActiveRecord::Base end def avatar_url - if avatar.present? + if self[:avatar].present? [gitlab_config.url, avatar.url].join elsif avatar_in_git Gitlab::Routing.url_helpers.namespace_project_avatar_url(namespace, self) diff --git a/app/models/user.rb b/app/models/user.rb index 5036a3e300c..695a47ba6eb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -653,7 +653,7 @@ class User < ActiveRecord::Base end def avatar_url(size = nil, scale = 2) - if avatar.present? + if self[:avatar].present? [gitlab_config.url, avatar.url].join else GravatarService.new.execute(email, size, scale) |