Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-25 11:16:11 +01:00

Use optional.Some

This commit is contained in:
erik 2024-04-09 11:21:57 +02:00
parent 97343470bc
commit 8579b7f7bb

View file

@ -8,7 +8,7 @@ import (
"fmt" "fmt"
"code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/optional"
"code.gitea.io/gitea/modules/validation" "code.gitea.io/gitea/modules/validation"
) )
@ -21,8 +21,8 @@ func CreateFederatedUser(ctx context.Context, user *User, federatedUser *Federat
return fmt.Errorf("User is not valid: %v", err) return fmt.Errorf("User is not valid: %v", err)
} }
overwrite := CreateUserOverwriteOptions{ overwrite := CreateUserOverwriteOptions{
IsActive: util.OptionalBoolFalse, IsActive: optional.Some(false),
IsRestricted: util.OptionalBoolFalse, IsRestricted: optional.Some(false),
} }
// Begin transaction // Begin transaction