chore: Bump ent to 0.11.2 (#2640)

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
Maksim Nabokikh
2022-08-29 11:16:12 +04:00
committed by GitHub
parent c5833e6b6f
commit 7efe1e28a8
88 changed files with 982 additions and 5380 deletions

View File

@@ -1,4 +1,4 @@
// Code generated by entc, DO NOT EDIT.
// Code generated by ent, DO NOT EDIT.
package db
@@ -193,7 +193,7 @@ func (osu *OfflineSessionUpdate) sqlSave(ctx context.Context) (n int, err error)
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{offlinesession.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return 0, err
}
@@ -281,9 +281,15 @@ func (osuo *OfflineSessionUpdateOne) Save(ctx context.Context) (*OfflineSession,
}
mut = osuo.hooks[i](mut)
}
if _, err := mut.Mutate(ctx, osuo.mutation); err != nil {
v, err := mut.Mutate(ctx, osuo.mutation)
if err != nil {
return nil, err
}
nv, ok := v.(*OfflineSession)
if !ok {
return nil, fmt.Errorf("unexpected node type %T returned from OfflineSessionMutation", v)
}
node = nv
}
return node, err
}
@@ -401,7 +407,7 @@ func (osuo *OfflineSessionUpdateOne) sqlSave(ctx context.Context) (_node *Offlin
if _, ok := err.(*sqlgraph.NotFoundError); ok {
err = &NotFoundError{offlinesession.Label}
} else if sqlgraph.IsConstraintError(err) {
err = &ConstraintError{err.Error(), err}
err = &ConstraintError{msg: err.Error(), wrap: err}
}
return nil, err
}