diff options
author | John Olheiser <john.olheiser@gmail.com> | 2020-11-05 08:20:42 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 08:20:42 -0600 |
commit | 7c68ac8f7dfa829eaa759ebdf636f770646d193d (patch) | |
tree | 5dad209c0241a73f3f74ab1e5f27ae3778e505dd /modules/context/repo.go | |
parent | 05efb335950c53a22415856aab3a970be0893113 (diff) | |
download | gitea-7c68ac8f7dfa829eaa759ebdf636f770646d193d.tar.gz gitea-7c68ac8f7dfa829eaa759ebdf636f770646d193d.zip |
Tags cleanup (#13428)
* Tags cleanup
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fmt
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index 9723c85619..f34b05d1d0 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -449,14 +449,18 @@ func RepoAssignment() macaron.Handler { ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL } - ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ - IncludeDrafts: false, - IncludeTags: true, + ctx.Data["NumTags"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + IncludeTags: true, }) if err != nil { ctx.ServerError("GetReleaseCountByRepoID", err) return } + ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{}) + if err != nil { + ctx.ServerError("GetReleaseCountByRepoID", err) + return + } ctx.Data["Title"] = owner.Name + "/" + repo.Name ctx.Data["Repository"] = repo |