Delete dev links when repository/issue/pull/branch deleted

This commit is contained in:
Lunny Xiao committed 2024-08-29 12:13:49 -07:00
1 parent e64f2322de
commit 6b829f77a3
5 files changed
+21 -2

No files matched your search

+2 -2
View File
@@ -64,8 +64,8 @@ func CreateIssueDevLink(ctx context.Context, link *IssueDevLink) error {
func DeleteIssueDevLinkByBranchName(ctx context.Context, repoID int64, branchName string) error {
_, err := db.GetEngine(ctx).
Where("link_type = ? AND link_index = ? AND linked_repo_id = ?",
IssueDevLinkTypeBranch, branchName, repoID).
Where("linked_repo_id = ? AND link_type = ? AND link_index = ?",
repoID, IssueDevLinkTypeBranch, branchName).
Delete(new(IssueDevLink))
return err
}