Browse Source

fix journal更新时的错误

pull/347/head
呱呱呱 2 years ago
parent
commit
3f8a7c7cee
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/api/pm/base_controller.rb
  2. +1
    -1
      app/controllers/api/pm/journals_controller.rb

+ 1
- 1
app/controllers/api/pm/base_controller.rb View File

@@ -31,7 +31,7 @@ class Api::Pm::BaseController < ApplicationController

def load_issue
return render_parameter_missing if params[:pm_project_id].blank?
@issue = @project.issues.issue_issue.where(pm_project_id: params[:pm_project_id]).find_by_id(params[:issue_id])
@issue = Issue.issue_issue.where(pm_project_id: params[:pm_project_id]).find_by_id(params[:issue_id])
render_not_found('疑修不存在!') if @issue.blank?
end
# 具有对仓库的管理权限


+ 1
- 1
app/controllers/api/pm/journals_controller.rb View File

@@ -49,7 +49,7 @@ class Api::Pm::JournalsController < Api::Pm::BaseController
end

def load_issue
@issue = @project.issues.issue_issue.where(pm_project_id: params[:pm_project_id]).find_by_id(params[:issue_id])
@issue = Issue.issue_issue.where(pm_project_id: params[:pm_project_id]).find_by_id(params[:issue_id])
render_not_found('疑修不存在!') if @issue.blank?
end



Loading…
Cancel
Save