mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
all: use more go-ish error for constraint failures
This commit is contained in:
@@ -154,9 +154,7 @@ func (nc *NodeCreate) sqlSave(ctx context.Context) (*Node, error) {
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
id := spec.ID.Value.(int64)
|
||||
n.ID = int(id)
|
||||
|
||||
return n, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user