mirror of
https://github.com/gogs/gogs.git
synced 2025-05-28 18:22:45 +00:00
routes/user/setting: fix avatar email update error (#5245)
This commit is contained in:
parent
05edcde6c9
commit
73dbaefec5
@ -119,7 +119,7 @@ func UpdateAvatarSetting(c *context.Context, f form.Avatar, ctxUser *models.User
|
|||||||
ctxUser.AvatarEmail = f.Gravatar
|
ctxUser.AvatarEmail = f.Gravatar
|
||||||
}
|
}
|
||||||
|
|
||||||
if f.Avatar != nil {
|
if f.Avatar != nil && f.Avatar.Filename != "" {
|
||||||
r, err := f.Avatar.Open()
|
r, err := f.Avatar.Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Avatar.Open: %v", err)
|
return fmt.Errorf("Avatar.Open: %v", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user