summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-01-12 21:37:46 +0100
committerGitHub <noreply@github.com>2022-01-12 20:37:46 +0000
commitff00b8688bf2a918a975c49081868815919b1793 (patch)
treef9be8a9eb214a95f7c7512fc5da4ae9f04497aad /routers
parent67d73882f4ade433fa8292784a5f5d0b8df50cb6 (diff)
downloadgitea-ff00b8688bf2a918a975c49081868815919b1793.tar.gz
gitea-ff00b8688bf2a918a975c49081868815919b1793.zip
Fix NPE on try to get tag reference via API (#18245)
* fix npe * rm gitRepo from Tag
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/tag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go
index 8d42e63a48..13a625bafb 100644
--- a/routers/api/v1/repo/tag.go
+++ b/routers/api/v1/repo/tag.go
@@ -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)
}