Browse Source

新增:项目标记创建时不能为空

pull/347/head
yystopf 2 years ago
parent
commit
f9ce2a8b26
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      app/controllers/api/pm/issue_tags_controller.rb

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

@@ -15,6 +15,7 @@ class Api::Pm::IssueTagsController < Api::Pm::BaseController

def create
return render_error("请输入正确的OrganizationID") unless Organization.exists?(id: issue_tag_create_params[:organization_id])
return render_error("项目标记名称不能为空!") unless issue_tag_create_params[:name].present?
@issue_tag = IssueTag.new(issue_tag_create_params.merge!(project_id: 0))
if @issue_tag.save!
render_ok


Loading…
Cancel
Save