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

This commit is contained in:
yystopf 2024-01-12 16:39:35 +08:00
parent 05aeecf67a
commit f9ce2a8b26
1 changed files with 1 additions and 0 deletions

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