修复:issue 查询需排除pr下issue

This commit is contained in:
yystopf 2023-02-27 15:04:18 +08:00
parent f05cf0c000
commit ddb5010e6d
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class Api::V1::Issues::JournalsController < Api::V1::BaseController
end
def load_issue
@issue = @project.issues.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index])
@issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index])
if @issue.blank?
render_not_found("疑修不存在!")
end

View File

@ -60,7 +60,7 @@ class Api::V1::IssuesController < Api::V1::BaseController
private
def load_issue
@issue = @project.issues.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index])
@issue = @project.issues.issue_issue.where(project_issues_index: params[:index]).where.not(id: params[:index]).take || Issue.find_by_id(params[:index])
if @issue.blank?
render_not_found("疑修不存在!")
end