Add missing return to handleSettingRemoteAddrError (#16794) (#16795)

Backport #16794

There is a missing return in handleSettingRemoteAddrError which means
that the error page for repo settings is duplicately rendered.

Fix #16771

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
release/v1.15
zeripath 2021-08-23 23:09:28 +01:00 committed by GitHub
parent 37e4cdbbe6
commit 31e4e8205a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -742,6 +742,7 @@ func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.R
default: default:
ctx.ServerError("Unknown error", err) ctx.ServerError("Unknown error", err)
} }
return
} }
ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, form) ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, form)
} }