diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2023-01-01 23:24:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-01 23:24:01 +0800 |
commit | 06970755470d24cbedbc9bcc26389fa52d2fe310 (patch) | |
tree | bcaba5381bed19aea66b57bfcf85530a1f0cbc37 /models/user/avatar.go | |
parent | f1e07d8c879aed32d079694d3623f9c6450ee8cd (diff) | |
download | gitea-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.go | 4 |
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: |