双向关联删除
This commit is contained in:
parent
0c509c58ed
commit
3dfb616213
|
@ -16,6 +16,8 @@ class Api::V1::Issues::DeleteService < ApplicationService
|
|||
try_lock("Api::V1::Issues::DeleteService:#{project.id}") # 开始写数据,加锁
|
||||
|
||||
delete_issue
|
||||
#删除双向关联
|
||||
PmLink.where(be_linkable_id: @issue.id, be_linkable_type: 'Issue').or(PmLink.where(linkable_id: @issue.id, linkable_type: 'Issue')).map(&:destroy)
|
||||
|
||||
project.incre_project_issue_cache_delete_count
|
||||
|
||||
|
|
Loading…
Reference in New Issue