summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorDavid Schneiderbauer <daviian@users.noreply.github.com>2018-05-19 15:22:09 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2018-05-19 21:22:09 +0800
commit44754774f17125a2041e3a1e17b62620fcb3ed92 (patch)
tree063df63d3bff6bb8667d7cde8136e08f6b74ef13 /routers
parent917b9641eca3fa1b1676ba1b4fd77a4e958ee153 (diff)
downloadgitea-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.go2
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)