Fix missed return (#29450)

pull/28102/head^2
Lunny Xiao 11 months ago committed by GitHub
parent 9a8c90ee18
commit e9f4c2db82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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 == "" {

Loading…
Cancel
Save