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
f5ee9379
Unverified
Commit
f5ee9379
authored
Apr 19, 2026
by
Wesley Liddick
Committed by
GitHub
Apr 19, 2026
Browse files
Merge pull request #1753 from touwaeriol/feat/fix-orphaned-scheduled-tests
fix: delete scheduled test plans when account is deleted
parents
e8be4344
6579f28b
Changes
1
Hide whitespace changes
Inline
Side-by-side
backend/internal/repository/account_repo.go
View file @
f5ee9379
...
...
@@ -438,6 +438,9 @@ func (r *accountRepository) Delete(ctx context.Context, id int64) error {
if
_
,
err
:=
txClient
.
AccountGroup
.
Delete
()
.
Where
(
dbaccountgroup
.
AccountIDEQ
(
id
))
.
Exec
(
ctx
);
err
!=
nil
{
return
err
}
if
_
,
err
:=
txClient
.
ExecContext
(
ctx
,
"DELETE FROM scheduled_test_plans WHERE account_id = $1"
,
id
);
err
!=
nil
{
return
err
}
if
_
,
err
:=
txClient
.
Account
.
Delete
()
.
Where
(
dbaccount
.
IDEQ
(
id
))
.
Exec
(
ctx
);
err
!=
nil
{
return
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