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

just some refactoring bits towards replacing **util.OptionalBool** with
**optional.Option[bool]**

(cherry picked from commit 274c0aea2e88db9bc41690c90e13e8aedf6193d4)
This commit is contained in:
6543 2024-02-28 06:39:12 +01:00 committed by Earl Warren
parent c498c07adf
commit 7b23949f29
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 22 additions and 19 deletions

View file

@ -547,7 +547,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 {