Upgraded ent.

This commit is contained in:
mikestefanello 2025-02-18 19:27:00 -05:00
parent acbc5e4bf6
commit 0bf9ab7189
9 changed files with 70 additions and 56 deletions

View file

@ -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