Upgraded ent.
This commit is contained in:
parent
acbc5e4bf6
commit
0bf9ab7189
9 changed files with 70 additions and 56 deletions
|
|
@ -106,7 +106,7 @@ func (ptc *PasswordTokenCreate) check() error {
|
|||
if _, ok := ptc.mutation.CreatedAt(); !ok {
|
||||
return &ValidationError{Name: "created_at", err: errors.New(`ent: missing required field "PasswordToken.created_at"`)}
|
||||
}
|
||||
if _, ok := ptc.mutation.UserID(); !ok {
|
||||
if len(ptc.mutation.UserIDs()) == 0 {
|
||||
return &ValidationError{Name: "user", err: errors.New(`ent: missing required edge "PasswordToken.user"`)}
|
||||
}
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue