mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Fix NPE on try to get tag reference via API (#18245)
* fix npe * rm gitRepo from Tag
This commit is contained in:
@@ -103,7 +103,7 @@ func GetAnnotatedTag(ctx *context.APIContext) {
|
||||
if tag, err := ctx.Repo.GitRepo.GetAnnotatedTag(sha); err != nil {
|
||||
ctx.Error(http.StatusBadRequest, "GetAnnotatedTag", err)
|
||||
} else {
|
||||
commit, err := tag.Commit()
|
||||
commit, err := tag.Commit(ctx.Repo.GitRepo)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusBadRequest, "GetAnnotatedTag", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user