From 2208ab923101c62bb8960dcafec1abe34731d1ea Mon Sep 17 00:00:00 2001 From: Trim21 Date: Mon, 1 Apr 2024 00:53:33 +0800 Subject: [PATCH] Update PullsEdges CreatorOrErr function and ent codegen version --- ent/pulls.go | 8 +++----- ent/runtime/runtime.go | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ent/pulls.go b/ent/pulls.go index 018f632..95b73d9 100644 --- a/ent/pulls.go +++ b/ent/pulls.go @@ -59,12 +59,10 @@ type PullsEdges struct { // CreatorOrErr returns the Creator value or an error if the edge // was not loaded in eager-loading, or loaded but was not found. func (e PullsEdges) CreatorOrErr() (*User, error) { - if e.loadedTypes[0] { - if e.Creator == nil { - // Edge was loaded but was not found. - return nil, &NotFoundError{label: user.Label} - } + if e.Creator != nil { return e.Creator, nil + } else if e.loadedTypes[0] { + return nil, &NotFoundError{label: user.Label} } return nil, &NotLoadedError{edge: "Creator"} } diff --git a/ent/runtime/runtime.go b/ent/runtime/runtime.go index d0e66e1..e49f19e 100644 --- a/ent/runtime/runtime.go +++ b/ent/runtime/runtime.go @@ -5,6 +5,6 @@ package runtime // The schema-stitching logic is generated in github-bot/ent/runtime.go const ( - Version = "v0.12.5" // Version of ent codegen. - Sum = "h1:KREM5E4CSoej4zeGa88Ou/gfturAnpUv0mzAjch1sj4=" // Sum of ent codegen. + Version = "v0.13.1" // Version of ent codegen. + Sum = "h1:uD8QwN1h6SNphdCCzmkMN3feSUzNnVvV/WIkHKMbzOE=" // Sum of ent codegen. )