mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 04:05:42 +01:00
Use optional.Some
This commit is contained in:
parent
97343470bc
commit
8579b7f7bb
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue