Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
陈曦
sub2api
Commits
2a94cc76
"git@web.lueluesay.top:chenxi/sub2api.git" did not exist on "be09188bdaff441cd8cfc680f573cf22448abe31"
Commit
2a94cc76
authored
Jan 18, 2026
by
yangjianbo
Browse files
fix(软删除): 增强错误处理,确保软删除操作中的错误类型正确
parent
150b315a
Changes
1
Show whitespace changes
Inline
Side-by-side
backend/ent/schema/mixins/soft_delete.go
View file @
2a94cc76
...
@@ -155,7 +155,12 @@ func mutateWithClient(ctx context.Context, m ent.Mutation, fallback ent.Mutator)
...
@@ -155,7 +155,12 @@ func mutateWithClient(ctx context.Context, m ent.Mutation, fallback ent.Mutator)
value
:=
results
[
0
]
.
Interface
()
value
:=
results
[
0
]
.
Interface
()
var
err
error
var
err
error
if
!
results
[
1
]
.
IsNil
()
{
if
!
results
[
1
]
.
IsNil
()
{
err
=
results
[
1
]
.
Interface
()
.
(
error
)
errValue
:=
results
[
1
]
.
Interface
()
typedErr
,
ok
:=
errValue
.
(
error
)
if
!
ok
{
return
nil
,
fmt
.
Errorf
(
"soft delete: unexpected error type %T for %T"
,
errValue
,
m
)
}
err
=
typedErr
}
}
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment