0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-21 18:22:13 +01:00

Re-enable random avatar feature (#3988)

* reenable random avatar feature

* replace Size check by Filename check
This commit is contained in:
David Schneiderbauer 2018-05-19 15:22:09 +02:00 committed by Lunny Xiao
parent 917b9641ec
commit 44754774f1

View file

@ -118,7 +118,7 @@ func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *mo
ctxUser.AvatarEmail = form.Gravatar
}
if form.Avatar != nil {
if form.Avatar.Filename != "" {
fr, err := form.Avatar.Open()
if err != nil {
return fmt.Errorf("Avatar.Open: %v", err)