mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-31 14:36:47 +00:00
fix(ui): prevent render failure on faulty org settings post (#8553)
Fix regression of https://codeberg.org/forgejo/forgejo/pulls/7998 Same as https://codeberg.org/forgejo/forgejo/pulls/8236 but for orgs Amended existing tests to verify which error messages show up and not show up. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8553 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
This commit is contained in:
parent
c9949fbc64
commit
6e9b97e377
2 changed files with 14 additions and 3 deletions
|
@ -71,6 +71,9 @@ func SettingsPost(ctx *context.Context) {
|
|||
ctx.Data["PageIsSettingsOptions"] = true
|
||||
ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility
|
||||
ctx.Data["CooldownPeriod"] = setting.Service.UsernameCooldownPeriod
|
||||
ctx.Data["MaxAvatarFileSize"] = setting.Avatar.MaxFileSize
|
||||
ctx.Data["MaxAvatarWidth"] = setting.Avatar.MaxWidth
|
||||
ctx.Data["MaxAvatarHeight"] = setting.Avatar.MaxHeight
|
||||
|
||||
if ctx.HasError() {
|
||||
ctx.HTML(http.StatusOK, tplSettingsOptions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue