From 364a2c136693794e20b95fb910ea9618ba8358b6 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 7 Apr 2022 18:11:42 +0800 Subject: [PATCH] fix: tag count error --- routers/api/v1/repo/tag.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go index e446660c4..4b07d4b04 100644 --- a/routers/api/v1/repo/tag.go +++ b/routers/api/v1/repo/tag.go @@ -301,7 +301,9 @@ func BranchTagCount(ctx *context.APIContext) { // "200": // "$ref": "#/responses/RepoBranchAndTagCount" - tagsCount, err := ctx.Repo.GitRepo.GetTagCount() // tags info + tagsCount, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + IncludeTags: true, + }) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTagCount", err) return