mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-23 20:17:03 +01:00
Re-enable random avatar feature (#3988)
* reenable random avatar feature * replace Size check by Filename check
This commit is contained in:
parent
917b9641ec
commit
44754774f1
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *mo
|
||||||
ctxUser.AvatarEmail = form.Gravatar
|
ctxUser.AvatarEmail = form.Gravatar
|
||||||
}
|
}
|
||||||
|
|
||||||
if form.Avatar != nil {
|
if form.Avatar.Filename != "" {
|
||||||
fr, err := form.Avatar.Open()
|
fr, err := form.Avatar.Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Avatar.Open: %v", err)
|
return fmt.Errorf("Avatar.Open: %v", err)
|
||||||
|
|
Loading…
Reference in a new issue