0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-22 02:04:16 +01:00

Fix missed return (#29450)

This commit is contained in:
Lunny Xiao 2024-02-27 23:09:13 +08:00 committed by GitHub
parent 9a8c90ee18
commit e9f4c2db82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -655,6 +655,7 @@ func UpdateFile(ctx *context.APIContext) {
apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions)
if ctx.Repo.Repository.IsEmpty {
ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty"))
return
}
if apiOpts.BranchName == "" {