Skip to content

Commit 4475477

Browse files
daviianlunny
authored andcommitted
Re-enable random avatar feature (#3988)
* reenable random avatar feature * replace Size check by Filename check
1 parent 917b964 commit 4475477

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/user/setting/profile.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *mo
118118
ctxUser.AvatarEmail = form.Gravatar
119119
}
120120

121-
if form.Avatar != nil {
121+
if form.Avatar.Filename != "" {
122122
fr, err := form.Avatar.Open()
123123
if err != nil {
124124
return fmt.Errorf("Avatar.Open: %v", err)

0 commit comments

Comments
 (0)