mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge pull request '修复进入关联子项后删除关联失败问题' (#317) from KingChan/forgeplus:pm_project_develop into pm_project_develop
This commit is contained in:
@@ -11,7 +11,8 @@ class Api::Pm::IssueLinksController < Api::Pm::BaseController
|
||||
end
|
||||
|
||||
def destroy
|
||||
@link = @issue.pm_links.find_by(be_linkable_type: 'Issue', be_linkable_id: params[:id])
|
||||
@links = PmLink.where(be_linkable_id: @issue.id, be_linkable_type: 'Issue', linkable_id: params[:id], linkable_type: 'Issue').or(PmLink.where(linkable_id: @issue.id, linkable_type: 'Issue', be_linkable_id: params[:id], be_linkable_type: 'Issue'))
|
||||
@link = @links.last
|
||||
if @link.try(:destroy)
|
||||
render_ok
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user