jojo/services/forms
Bram Hagens 48d2af5561 fix: skip repo avatar upload when no file is selected (#11335)
Submitting the repo avatar form without selecting a file shows a raw Go error: `Avatar.Open: open : no such file or directory.`. The existing `nil` check does not prevent this from happening.

The user avatar handler already guards against this same problem with [`form.Avatar != nil && form.Avatar.Filename != ""`](e1cecbd276/routers/web/user/setting/profile.go (L141)), I've done the same for the repo avatar handler.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11335
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Bram Hagens <bram@bramh.me>
Co-committed-by: Bram Hagens <bram@bramh.me>
2026-03-07 20:53:23 +01:00
..
admin.go feat: Add support for administrators to set email visibility on user accounts (#9668) 2025-10-15 03:21:15 +02:00
auth_form.go feat: allow sync quota groups with oauth2 auth source (#8554) 2025-12-01 14:12:00 +01:00
avatar.go fix: skip repo avatar upload when no file is selected (#11335) 2026-03-07 20:53:23 +01:00
org.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
package_form.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo_branch_form.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo_form.go feat: Drag and drop nested directories (#6687) 2025-10-03 00:16:40 +02:00
repo_form_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
repo_tag_form.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
report_abuse.go feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
runner.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user_form.go chore: add email blocklist unit test 2025-08-30 09:45:19 +02:00
user_form_auth_openid.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user_form_hidden_comments.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user_form_test.go chore: add email blocklist unit test 2025-08-30 09:45:19 +02:00