aboutsummaryrefslogtreecommitdiffstats
path: root/models/user/avatar.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-11-10 14:43:53 +0800
committerGitHub <noreply@github.com>2022-11-10 14:43:53 +0800
commit385462d36c75e809ee082d3432941f938cbdffc9 (patch)
tree938946297d1c0fa736852e1054f732ed2b0db686 /models/user/avatar.go
parentce5aafbc698de72d8acf03851dc5db057b3cc01f (diff)
downloadgitea-385462d36c75e809ee082d3432941f938cbdffc9.tar.gz
gitea-385462d36c75e809ee082d3432941f938cbdffc9.zip
Fix dashboard ignored system setting cache (#21621)
This is a performance regression from #18058 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'models/user/avatar.go')
-rw-r--r--models/user/avatar.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/models/user/avatar.go b/models/user/avatar.go
index f73ac56c5e..102206f3a2 100644
--- a/models/user/avatar.go
+++ b/models/user/avatar.go
@@ -68,11 +68,9 @@ func (u *User) AvatarLinkWithSize(size int) string {
useLocalAvatar := false
autoGenerateAvatar := false
- var disableGravatar bool
disableGravatarSetting, _ := system_model.GetSetting(system_model.KeyPictureDisableGravatar)
- if disableGravatarSetting != nil {
- disableGravatar = disableGravatarSetting.GetValueBool()
- }
+
+ disableGravatar := disableGravatarSetting.GetValueBool()
switch {
case u.UseCustomAvatar: