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

@ -41,12 +41,10 @@ type PasswordTokenEdges struct {
// UserOrErr returns the User value or an error if the edge
// was not loaded in eager-loading, or loaded but was not found.
func (e PasswordTokenEdges) UserOrErr() (*User, error) {
if e.loadedTypes[0] {
if e.User == nil {
// Edge was loaded but was not found.
return nil, &NotFoundError{label: user.Label}
}
if e.User != nil {
return e.User, nil
} else if e.loadedTypes[0] {
return nil, &NotFoundError{label: user.Label}
}
return nil, &NotLoadedError{edge: "user"}
}