mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-05 21:16:11 +01:00
Fix test
This commit is contained in:
parent
43cdc71ed7
commit
b580b59c65
@ -188,17 +188,18 @@ func DeleteRepositoryDirectly(ctx context.Context, repoID int64, ignoreOrgTeams
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete Pulls and related objects
|
|
||||||
if err := issues_model.DeletePullsByBaseRepoID(ctx, repoID); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
// Delete Issues and related objects
|
// Delete Issues and related objects
|
||||||
var attachmentPaths []string
|
var attachmentPaths []string
|
||||||
if attachmentPaths, err = issue_service.DeleteIssuesByRepoID(ctx, repoID); err != nil {
|
if attachmentPaths, err = issue_service.DeleteIssuesByRepoID(ctx, repoID); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Delete Pulls and related objects
|
||||||
|
// Notice: we should delete issue first because issue may load pull request
|
||||||
|
if err := issues_model.DeletePullsByBaseRepoID(ctx, repoID); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Delete issue index
|
// Delete issue index
|
||||||
if err := db.DeleteResourceIndex(ctx, "issue_index", repoID); err != nil {
|
if err := db.DeleteResourceIndex(ctx, "issue_index", repoID); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user