diff options
author | David Schneiderbauer <daviian@users.noreply.github.com> | 2018-05-19 15:22:09 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2018-05-19 21:22:09 +0800 |
commit | 44754774f17125a2041e3a1e17b62620fcb3ed92 (patch) | |
tree | 063df63d3bff6bb8667d7cde8136e08f6b74ef13 /routers | |
parent | 917b9641eca3fa1b1676ba1b4fd77a4e958ee153 (diff) | |
download | gitea-44754774f17125a2041e3a1e17b62620fcb3ed92.tar.gz gitea-44754774f17125a2041e3a1e17b62620fcb3ed92.zip |
Re-enable random avatar feature (#3988)
* reenable random avatar feature
* replace Size check by Filename check
Diffstat (limited to 'routers')
-rw-r--r-- | routers/user/setting/profile.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go index 2ca64ad2e5..cf222d0027 100644 --- a/routers/user/setting/profile.go +++ b/routers/user/setting/profile.go @@ -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) |