summaryrefslogtreecommitdiffstats
path: root/models/user/avatar.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-01 23:24:01 +0800
committerGitHub <noreply@github.com>2023-01-01 23:24:01 +0800
commit06970755470d24cbedbc9bcc26389fa52d2fe310 (patch)
treebcaba5381bed19aea66b57bfcf85530a1f0cbc37 /models/user/avatar.go
parentf1e07d8c879aed32d079694d3623f9c6450ee8cd (diff)
downloadgitea-06970755470d24cbedbc9bcc26389fa52d2fe310.tar.gz
gitea-06970755470d24cbedbc9bcc26389fa52d2fe310.zip
Fix get system setting bug when enabled redis cache (#22298)
backport #22295, fix #22281 Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'models/user/avatar.go')
-rw-r--r--models/user/avatar.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/models/user/avatar.go b/models/user/avatar.go
index 102206f3a2..08b3b0e331 100644
--- a/models/user/avatar.go
+++ b/models/user/avatar.go
@@ -68,9 +68,7 @@ func (u *User) AvatarLinkWithSize(size int) string {
useLocalAvatar := false
autoGenerateAvatar := false
- disableGravatarSetting, _ := system_model.GetSetting(system_model.KeyPictureDisableGravatar)
-
- disableGravatar := disableGravatarSetting.GetValueBool()
+ disableGravatar := system_model.GetSettingBool(system_model.KeyPictureDisableGravatar)
switch {
case u.UseCustomAvatar: