双向关联

This commit is contained in:
kingChan 2024-06-12 11:22:20 +08:00
parent 2d30ae9914
commit 486156ff92
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ class Api::Pm::IssueLinksController < Api::Pm::BaseController
before_action :load_project
before_action :load_issue
def index
@links = @issue.pm_links.where(be_linkable_type: 'Issue')
@links = PmLink.where(be_linkable_id: @issue.id,be_linkable_type: 'Issue').or(PmLink.where(linkable_id: @issue.id,linkable_type: 'Issue'))
end
def create