1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Let ctx.FormOptionalBool() return optional.Option[bool] (#29461)

just some refactoring bits towards replacing **util.OptionalBool** with
**optional.Option[bool]**
This commit is contained in:
6543
2024-02-28 06:39:12 +01:00
committed by GitHub
parent db545b208b
commit 274c0aea2e
5 changed files with 22 additions and 19 deletions

View File

@@ -546,7 +546,7 @@ func RepoAssignment(ctx *Context) context.CancelFunc {
ctx.Data["NumTags"], err = db.Count[repo_model.Release](ctx, repo_model.FindReleasesOptions{
IncludeDrafts: true,
IncludeTags: true,
HasSha1: util.OptionalBoolTrue, // only draft releases which are created with existing tags
HasSha1: optional.Some(true), // only draft releases which are created with existing tags
RepoID: ctx.Repo.Repository.ID,
})
if err != nil {