Quellcode durchsuchen

Fix missed return (#29450) (#29453)

Backport #29450 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
tags/v1.21.8
Giteabot vor 3 Monaten
Ursprung
Commit
2df38af752
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1
    0
      routers/api/v1/repo/file.go

+ 1
- 0
routers/api/v1/repo/file.go Datei anzeigen

@@ -649,6 +649,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 == "" {

Laden…
Abbrechen
Speichern